socket woes

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

socket woes

Post by adventuresofgreg » Wed Sep 30, 2015 1:03 pm

Howdy. Is there any reason that the following script won't result in server messages being collected in field "incoming" ? I'm not sure if my server message is formatted correctly or not, and If it is not, I may not even get a response from the server. But first, I would like to confirm that my socket connection, write and read from code is good.

global pSocket

on mouseUp
put "216.52.236.112" into tIPaddress
put "7000" into tPort
put (tipaddress & ":" & tPort) into pSocket
open socket to pSocket with message "chatconnected"
end mouseUp

on chatconnected pSocket
put "we in man!" && pSocket
read from socket pSocket with message "chatReceived"
end chatconnected

on chatReceived pSocket, pData
put pdata & return after field "incoming"
read from socket pSocket with message "chatReceived"
end chatReceved

Post Reply

Return to “Talking LiveCode”