parent
dd84dc85d0
commit
ab69849a05
2 changed files with 8 additions and 4 deletions
|
|
@ -16,6 +16,10 @@ const
|
||||||
MAX_KQUEUE_CHANGE_EVENTS = 64
|
MAX_KQUEUE_CHANGE_EVENTS = 64
|
||||||
# Maximum number of events that can be returned.
|
# Maximum number of events that can be returned.
|
||||||
MAX_KQUEUE_RESULT_EVENTS = 64
|
MAX_KQUEUE_RESULT_EVENTS = 64
|
||||||
|
# SIG_IGN and SIG_DFL declared in posix.nim as variables, but we need them
|
||||||
|
# to be constants and GC-safe.
|
||||||
|
SIG_DFL = cast[proc(x: cint) {.noconv,gcsafe.}](0)
|
||||||
|
SIG_IGN = cast[proc(x: cint) {.noconv,gcsafe.}](1)
|
||||||
|
|
||||||
when defined(macosx) or defined(freebsd):
|
when defined(macosx) or defined(freebsd):
|
||||||
when defined(macosx):
|
when defined(macosx):
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ when not defined(windows):
|
||||||
var rc2 = selector.select(100)
|
var rc2 = selector.select(100)
|
||||||
assert(len(rc2) == 1)
|
assert(len(rc2) == 1)
|
||||||
|
|
||||||
var read_count = posix.recv(server2_socket, addr (buffer[0]), 128, 0)
|
var read_count = posix.recv(server2_socket, addr buffer[0], 128, 0)
|
||||||
if read_count == -1:
|
if read_count == -1:
|
||||||
raiseOSError(osLastError())
|
raiseOSError(osLastError())
|
||||||
|
|
||||||
|
|
@ -317,7 +317,7 @@ else:
|
||||||
var rc2 = selector.select(100)
|
var rc2 = selector.select(100)
|
||||||
assert(len(rc2) == 1)
|
assert(len(rc2) == 1)
|
||||||
|
|
||||||
var read_count = recv(server2_socket, addr (buffer[0]), 128, 0)
|
var read_count = recv(server2_socket, addr buffer[0], 128, 0)
|
||||||
if read_count == -1:
|
if read_count == -1:
|
||||||
raiseOSError(osLastError())
|
raiseOSError(osLastError())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue