- The socket listener can be removed with DeleteObject.
- Properties of the socket listener can be modified with SocketListener[…][prop]=val.
- The property "Socket" returns the SocketObject being listened on by this SocketListener.
- The following properties can be modified on the SocketListener:
CharacterEncoding $CharacterEncoding the character encoding to assume HandlerFunctionsKeys Default keys to include in the data association HandlerFunctions Automatic how to handle socket events RecordSeparators None how messages are taken to be delimited
- The following events can be generated while listening on the socket:
"DataReceived" data is available on the socket
- The following default keys are included in the association for each generated event:
"Data" the data received, as a string "Socket" the SocketObject being listened on "SourceSocket" the SocketObject that generated the event "Timestamp" time when the event occurred (as a DateObject)
- The following additional keys can also be requested in HandlerFunctionsKeys:
"DataBytes" the raw data received, as a list of byte values "DataByteArray" the raw data received, as a ByteArray object "MultipartComplete" whether a multipart ZMQ message is complete
Basic Examples (3)
Listen on an available socket to get a SocketListener:
Change the value of the HandlerFunctionsKeys after starting listening on the socket:
Get the SocketObject that was automatically opened:
Introduced in 2017