HI, I am tinkering with TCPSocket, and I am not getting it, I used to do a lot of serial communication programming and just starting to use TCP. I am writing a little app to send a dozen or so commands to a piece of gear of ethernet, actually UDP. I have read through the TCPSocket stuff a couple times and I am still missing some things. I think I am not initializing the port correctly and I am not sure how to actually send the command. I do have the TCPSocket dropped on my app window. This what I cam up with parsing through some examples online. Here is my failing code snippet:
Dim IP as String
Dim PT as Integer
Dim theMessage As String
IP = TextField1.Text
PT = CDbl(TextField2.Text)
TCPSocket1.Address = IP //172.168.10.11 example
TCPSocket1.Port = PT // 11116 example
TCPSocket1.Connect
theMessage = (“spyder RSL 2 1”) // the message the receiver wants, in other programs, this message
//is ‘spyder\x00\x00\x00\x00RSL 2 1’ with the \x00 being for hex spaces
TCPSocket1.Write (theMessage)
TCPSocket1.Flush