How to mimic telnet session

RGould8 at aol.com RGould8 at aol.com
Mon Dec 29 13:58:25 EST 2003


Dar,

Thanks for your advice on tweaking my  code to do a telnet session.  
I feel  like a dunce today, but I'm still not getting any data back.  
Did I  mis-type somthing, or misunderstand where the handlers should go?

on mouseUp
put EMPTY into  msg
open socket "dins.gte.net:7777" 
write  "cmd=getAccessType"  & CRLF to socket "dins.gte.net:7777" with message 
 "callbackmsg"
put "callback (the result) = " & the result & LF  after msg
wait 3 seconds
read from socket  "dins.gte.net:7777" until empty with message "gotData"
put "read (the  result) = " & the result & LF after msg
put "databack (the  data) = " & it & LF after msg
close socket  "dins.gte.net:7777"
end mouseUp


on callbackmsg data 
put  "callback" & the result & LF after msg
end callbackmsg

on  socketError parm
put "got an error " & parm & LF after  msg
end socketError

on gotData socketID data
put "from  gotData hander (the data) = " & data & LF after msg
end  gotData


More information about the use-livecode mailing list