Displaying 3 results from an estimated 3 matches for "get_peernam".
Did you mean:
get_peername
2008 Apr 30
5
get_peername - start_server vs. connect
Hi,
On windows, get_peername works both with connections obtained
via start_server, and connections obtained via connect.
On linux, get_peername seems to only work with connections
obtained via start_server.
(I''m using svn HEAD.)
I''m wondering which is the intended behavior?
(I realize get_peername is le...
2008 Jan 16
3
getsockname access
Is getsockname (or its equivalent) available to an EM Connection
object? I''d like to access the local port number in my client
application.
--Michael
2007 Sep 14
3
epoll appears to break
...with epoll? The ''EPOLL'' readme file doesn''t seem to
mention it.
Regards, Brian.
-- 8< ---------
require ''rubygems''
require ''eventmachine''
module EchoServer
def post_init
puts "Connection from #{Socket.unpack_sockaddr_in(get_peername).inspect}"
set_comm_inactivity_timeout 60
end
def receive_data data
send_data ">>>you sent: #{data}"
close_connection if data =~ /quit/i
end
end
EventMachine::epoll
puts EventMachine::set_descriptor_table_size
EventMachine::run {
EventMachine::start_server &q...