parent
abcd9fd2e8
commit
81e5a35d56
2 changed files with 2 additions and 2 deletions
|
|
@ -1295,7 +1295,7 @@ proc recvFrom*(socket: Socket, data: var string, length: int,
|
|||
|
||||
if result != -1:
|
||||
data.setLen(result)
|
||||
address = $inet_ntoa(sockAddress.sin_addr)
|
||||
address = getAddrString(cast[ptr SockAddr](addr(sockAddress)))
|
||||
port = ntohs(sockAddress.sin_port).Port
|
||||
else:
|
||||
raiseOSError(osLastError())
|
||||
|
|
|
|||
|
|
@ -896,7 +896,7 @@ proc getProcessTimes*(hProcess: Handle; lpCreationTime, lpExitTime,
|
|||
dynlib: "kernel32", importc: "GetProcessTimes".}
|
||||
|
||||
type inet_ntop_proc = proc(family: cint, paddr: pointer, pStringBuffer: cstring,
|
||||
stringBufSize: int32): cstring {.gcsafe, stdcall.}
|
||||
stringBufSize: int32): cstring {.gcsafe, stdcall, tags: [].}
|
||||
|
||||
var inet_ntop_real: inet_ntop_proc = nil
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue