Permalink
Browse files

add simple echo server for debugging

  • Loading branch information...
tmm1 committed Jul 30, 2008
1 parent 2b88e73 commit e6233aa073d2f11b71de6e1c5bf8cc5f007f5809
Showing with 27 additions and 0 deletions.
  1. +27 −0 server.rb
View
@@ -0,0 +1,27 @@
+require 'rubygems'
+require 'eventmachine'
+
+EM.run{
+
+ module Proxy
+ def initialize
+ # p [:init]
+ end
+ def post_init
+ # p [:connected]
+ end
+ def receive_data data
+ p [:receive, data]
+ end
+ def send_data data
+ p [:send, data]
+ super
+ end
+ def unbind
+ # p [:disconnected]
+ end
+ end
+
+ EM.start_server '127.0.0.1', 27017, Proxy
+
+}

0 comments on commit e6233aa

Please sign in to comment.