 
 : packet-size 65536 ; inline
 
-packet-size <byte-array> receive-buffer set-global
+[ packet-size malloc receive-buffer set-global ] "io.unix.sockets" add-init-hook
 
 :: do-receive ( port -- packet sockaddr )
     port addr>> empty-sockaddr/size [| sockaddr len |

        sockaddr ! from
        len <int> ! fromlen
        recvfrom dup 0 >= [
            receive-buffer get-global swap head sockaddr
        ] [
            drop f f
        ] if

io.binary io.unix.backend io.streams.duplex
io.backend io.ports io.files io.files.private
io.encodings.utf8 math.parser continuations libc combinators
system accessors qualified destructors unix locals init ;

EXCLUDE: io => read write close ;
EXCLUDE: io.sockets => accept ;
