Reverted to erlang_js
This commit is contained in:
parent
4965013fc9
commit
dcab797d0f
4 changed files with 21 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
Reference in a new issue