Changeset 197
- Timestamp:
- 06/03/06 20:06:56 (2 years ago)
- Files:
-
- experiments/NewMachine/test/event1_test.rb (modified) (1 diff)
- experiments/NewMachine/test/tcp_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
experiments/NewMachine/test/event1_test.rb
r191 r197 64 64 65 65 def string_event evt 66 p @@previous.length66 #p @@previous.length 67 67 if @@previous.length > 1 68 68 @@previous[-2].send_event "a" experiments/NewMachine/test/tcp_test.rb
r193 r197 14 14 end 15 15 def received_line ln 16 Machine::Reactor.stop if ln == "STOP" 17 end 18 end 19 20 class LineProtocol2 < Machine::LineReceiver 21 def initialize 22 super 23 end 24 def completed_connection evt 25 p "Got connection" 26 end 27 def received_line ln 28 p ln 16 29 Machine::Reactor.stop if ln == "STOP" 17 30 end … … 37 50 end 38 51 52 def test_tcp_client 53 Reactor.run { 54 Reactor.connect_tcp "relay.spheriq.net", 25, LineProtocol2.new 55 } 56 end 57 39 58 end
