FiberManager.listenStream

Core listen function for streaming connection-oriented sockets (TCP, etc.)

More...
class FiberManager
Socket
listenStream
(
Address addr
,
void delegate
(
Socket
)
connectionHandler
,)

Return Value

Type: Socket

the listening socket. You shouldn't do much with this except maybe close it when you are done.

Detailed Description

It will:

  • Create a FiberSocket
  • Create fibers on it for each incoming connection which call your connectionHandler
  • Bind to the given Address
  • Call socket.listen(backlog)
  • Start accepting connections.

Meta