mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user