receive

receive line of data from selected socket


Parameters

receive origin :socket

Attributes

size:integerset maximum size of received data
timeout:integerset timeout (in milliseconds)

Returns

  • :string

Examples

copy
server: listen 18966 print "started server connection..." client: accept server print ["accepted incoming connection from:" client] keepGoing: true while [keepGoing][ message: receive client print ["received message:" message] if message = "exit" [ unplug client keepGoing: false ] ] unplug server

Related