Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TCP Connections / Talking to EventGhost
#3
I have this so far:
Code:
Copy      Help
out
#compile "__TcpIpClient"
TcpIpClient x

str server="localhost"
str getfile=""
str receivedData
str cookie
str token
str digest

out "---- connecting ----"

if(!x.Connect(server 1024)) out "failed"

out "---- validating ----"

if(!x.Send("quintessence\n\r")) out "failed"
if(!x.Receive(cookie 128)) out "failed"
out cookie
digest.encrypt(2|8 cookie)
out digest
digest.from(digest "\n")
out digest
if(!x.Send(digest)) out "failed"

out "---- sending request ----"

str request.format("Vol Up %s" getfile)
out "---- receiving ----"

if(!x.Receive(receivedData)) end "failed"

out "---- received: ----"
out receivedData

It hangs at the first "Send" and I'm unsure how to figure out why.

- Derek


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)