class Alo7::Net::Server

This is a class that provides the server logics.

Public Class Methods

listen(host_or_port, port = nil, *args, &block) click to toggle source

Initiate a TCP server on the specified IP address and port.

@overload listen(host, port)

@param host [String] host to listen on
@param port [Integer] port to listen on
@param *args passed to the initializer of the server

@overload listen(port)

@param port [Integer] port to listen on
@param *args passed to the initializer of the server

@yield [connection] initiated when a connection is made @return (see Net.listen)

@raise (see Net.listen)

# File lib/alo7/net/server.rb, line 21
def self.listen(host_or_port, port = nil, *args, &block)
  Net.listen self, host_or_port, port, *args, &block
end