def listen(addr, port, metainfo)
      listener = Socket.new( AF_INET, SOCK_STREAM, 0 )
      sockaddr = Socket.pack_sockaddr_in( port, "0.0.0.0" )
      listener.setsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR, true)
      listener.bind( sockaddr )
      @logger.debug "listening on port #{port}" if @logger
      listener.listen( @listenBacklog )
                 
      info = IOInfo.new(listener, metainfo)
      info.readFiberIoFacade.logger = @logger if @logger
      info.state = :listening
      @ioInfo[info.io] = info
    end
def listen(addr, port, metainfo)
      listener = Socket.new( AF_INET, SOCK_STREAM, 0 )
      sockaddr = Socket.pack_sockaddr_in( port, "0.0.0.0" )
      listener.setsockopt(Socket::SOL_SOCKET,Socket::SO_REUSEADDR, true)
      listener.bind( sockaddr )
      @logger.debug "listening on port #{port}" if @logger
      listener.listen( @listenBacklog )
                 
      info = IOInfo.new(listener, metainfo)
      info.readFiberIoFacade.logger = @logger if @logger
      info.state = :listening
      @ioInfo[info.io] = info
    end
Create a TCP server that listens for connections on the specified
 port