How do I write to a duplex stream?
问题 Suppose I have a Super Simple Socket Server that accepts connections on a port at localhost : : server-new ( port -- stream ) f swap <inet4> utf8 <server> accept drop ; And I can use it like: IN: scratchpad 1204 server-new Which waits for a connection. In a terminal: $ curl localhost:1204 _ Which then waits for the server to reply. server-new leaves a duplex-stream on the stack. T{ duplex-stream { in T{ decoder { stream T{ input-port { handle T{ fd { fd 36 } } } { buffer T{ buffer { size