IBMStreams com.ibm.streamsx.inet Toolkit > com.ibm.streamsx.inet 2.9.6 > com.ibm.streamsx.inet.wsserver > WebSocketInject
Operator recieves messages from WebSocket clients and generates a tuple which is sent to streams. Each received message is output as tuple. The data received is dependent upon the input ports schema.
Required: port
Optional: ackCount, initDelay, messageAttribute, senderIdAttribute
First attribute will have the message received via the WebSocket, of type rstring. Second attribute (if provided) will have the senders unique id, or type rstring.Subsequent attribute(s) are allowed and will not be poplulated.
Required: port
Optional: ackCount, initDelay, messageAttribute, senderIdAttribute
The operator sends out an ack message to all currently connected clients. An ack message is sent when the (totaslNumberOfMessagesRecieved % ackCount) == 0, The ack message is a in JSON format { status:'COUNT', text:<totalNumberOfMessagesReceived>}. Default value is 0, no ack messages will be sent.
Delay in seconds before the operator starts producing tuples.
Input port's attribute that the data received will be stored to. If the port has more than one attribute this parameter is required.
WebSocket network port that messages arrive on. The WebSocket client(s) use this port to transmit on.
Input port attribute that will we loaded with the message sender's identifier, this identifier is consistent during the lifetime of the sender's session.