Sockets (again)

Bob Sneidar bobsneidar at iotecdigital.com
Mon Jun 29 17:42:03 EDT 2020


Hi all. 

I’m trying to get sockets working. The host is working, but I am not getting the message to trigger. Here’s the basic code: 

on mouseUp
   put "test" into tPayLoad
   open socket to "localhost:8085"
   write tPayload to socket "localhost:8085"
end mouseUp

-- socket handlers
on acceptConnections
  accept connections on port 8085 with message "ConnectionMade"
end acceptConnections

on ConnectionMade pIPAddress
  read from socket pIPAddress with message "dataReceived"
end ConnectionMade

on dataReceived pSocket
put pSocket
   <snip>


ConnectionMade gets called, but dataReceived does not. 

Bob S



More information about the use-livecode mailing list