PDA

View Full Version : GIP - having problems writing data over an open socket



jndreu
December 3rd, 2009, 05:43 PM
I have been able to successfully open a socket connection to another PC on my network and capture data passed to me through that connection. I am now trying to write data over this connection but it seems as though the data I am sending is being converted to HEX or something...

I'm using the lua command:

c:Write("button-down\r\n")

The PC on the other end should take a corresponding action when it sees the text "button-down" but in looking at the lua console I see it is sending back an error instead. So I tried doing a manual telnet to that PC and typing the command and it works fine.

if I do a print(c) I get:

userdata: 0DA381E8

Is the userdata what is actually being sent over the socket or is this something else? How can I check to see what is being sent by the write command?

jndreu
December 3rd, 2009, 07:17 PM
I figured it out... it was something else and I was using the right lua commands all along.