James Harrison wrote in post #1062384:
> I did a quick search for socket.c and found documentation in there that
> references TCPServer.new, but which doesnt seem to have any
> implementation
> that would recognise the name TCPServer.new.

Which Ruby are you looking at? In 1.8 it's pretty simple, the constant 
TCPServer is defined in socket.c

ruby-1.8.7-p352 $ grep -iR TCPServer ext/
ext/socket/socket.c:VALUE rb_cTCPServer;
ext/socket/socket.c: *  serv = TCPServer.new("127.0.0.1", 0)
ext/socket/socket.c: *  tcpserver.accept_nonblock => tcpsocket
ext/socket/socket.c: *  serv = TCPServer.new(2202)
ext/socket/socket.c: * to TCPServer#accept_nonblock fails.
ext/socket/socket.c: * TCPServer#accept_nonblock may raise any error 
corresponding to accept(2) failure,
ext/socket/socket.c: * * TCPServer#accept
ext/socket/socket.c: *   sock = TCPServer(addr, port)
ext/socket/socket.c:    rb_cTCPServer = rb_define_class("TCPServer", 
rb_cTCPSocket);
ext/socket/socket.c:    rb_define_global_const("TCPserver", 
rb_cTCPServer);
ext/socket/socket.c:    rb_define_method(rb_cTCPServer, "accept", 
tcp_accept, 0);
ext/socket/socket.c:    rb_define_method(rb_cTCPServer, 
"accept_nonblock", tcp_accept_nonblock, 0);
ext/socket/socket.c:    rb_define_method(rb_cTCPServer, "sysaccept", 
tcp_sysaccept, 0);
ext/socket/socket.c:    rb_define_method(rb_cTCPServer, "initialize", 
tcp_svr_init, -1);
ext/socket/socket.c:    rb_define_method(rb_cTCPServer, "listen", 
sock_listen, 1);
ext/tk/sample/tkextlib/tkHTML/page3/index.html:  Tcl_OpenTcpServer<br>

-- 
Posted via http://www.ruby-forum.com/.