search for: this_sess

Displaying 1 result from an estimated 1 matches for "this_sess".

Did you mean: tcps_sess
2006 Jun 27
2
non-traditional rails app
...apps just for testing purposes. Many of these apps are not DB driven, so the whole CRUD concept does not apply to them... here''s a sample: require ''socket'' server = TCPServer.new(''12345'') while (session = server.accept) Thread.new(session) do |this_session| data = this_session.gets public_ip = this_session.peeraddr[3] this_session.close puts Time.now.strftime(''%Y-%m-%d'') puts Time.now.strftime(''%H:%M:%S'') puts public_ip puts data.strip puts data.strip.length end end How easy wo...