Dear somebody,
After looking for an equivalent to Applescript on the PC and after
trawling loads of stuff, Ruby looks like its for me. However I can't
set up a simple tcp send and receive to an IP address which is
running a TCP server app
#!/usr/bin/env ruby
require 'socket'
s =TCPSocket.new("192.168.0.178",13)
data = s.recv(150)
puts data // check I I get the initial response string
from server ok
s.send("/showcommands",0)
data = s.recv(3050)
puts data // nothing is displayed on console
s.close
I get the initial connection OK and the connection response from the
server, which I put to the console (just to check), however RDE says
the data variable is nil ??
I then try to send a string "/showcommands", which the server should
respond to with a string of data.
Can someone show me where I'm going wrong.
regards
Paul