Reverted to erlang_js

This commit is contained in:
Jonatan Pålsson 2011-01-30 14:14:33 +01:00
parent 4965013fc9
commit dcab797d0f
4 changed files with 21 additions and 14 deletions

View file

@ -5,11 +5,12 @@ require 'socket' # Sockets are in standard library
hostname = 'localhost'
port = 7000
s = TCPSocket.open(hostname, port)
print "Which port @ loclhost?"
port = gets
print "What to echo? "
q = gets
s.print(q.chop)
s = TCPSocket.open(hostname, port.chop)
s.print("{\"request\": \"define\"}")
while true
line = s.gets # Read lines from the socket