mrblib/mrb_simplehttpserver.rb
def accept_connection(tcp)
    counter = counter ? counter + 1 : 1

    sock = BasicSocket.for_fd(tcp.sysaccept)
    sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_NOSIGPIPE, true) if Socket.const_defined? :SO_NOSIGPIPE
    sock
  rescue RuntimeError => e
    counter == 1 ? retry : raise(e)
  end
# Wait for incoming socket connection.
#
# @param [ TCPServer ] tcp The TCP server which is bind to a port.
#
# @return [ BasicSocket ]
Wait for incoming socket connection.
Wait for incoming socket connection .
def accept_connection(tcp)
    counter = counter ? counter + 1 : 1
    sock = BasicSocket.for_fd(tcp.sysaccept)
    sock.setsockopt(Socket::SOL_SOCKET, Socket::SO_NOSIGPIPE, true) if Socket.const_defined? :SO_NOSIGPIPE
    sock
  rescue RuntimeError => e
    counter == 1 ? retry : raise(e)
  end
def accept_connection ( tcp ) counter = counter ? counter + 1 : 1 sock = BasicSocket . for_fd ( tcp . sysaccept ) sock . setsockopt ( Socket :: SOL_SOCKET , Socket :: SO_NOSIGPIPE , true ) if Socket . const_defined? :SO_NOSIGPIPE sock rescue RuntimeError => e counter == 1 ? retry : raise ( e ) end
Wait for incoming socket connection.
Wait for incoming socket connection .
None
 BasicSocket 
tcp
tcp The TCP server which is bind to a port.
tcp The TCP server which is bind to a port .