T4S4  18.2 C7549 A21431
Teamcenter Gateway for SAP S/4HANA API Reference
WEBSOCKET functions

Functions

 tpco_bcwsockmsg
 This function sends a broadcast message to all clients on a channel. More...
 

Detailed Description

Function Documentation

◆ tpco_bcwsockmsg()

tpco_bcwsockmsg

This function sends a broadcast message to all clients on a channel.

Parameters
channelthe wsock channel name
messagethe txt message
Returns
>0 handle ID, <0 error
1 # WebSocket chat server call
2 proc chat {args} {
3  set ret 0
4 
5  set message [tpco_formatHEX16 [lindex $args end]]
6  tpco_bcwsockmsg /wsock/chat "BROADCAST :: $message"
7  return [::TPHAP::createWSockRes TXT "Call return -> in raw message :: >$args< ($message)"]
8 }; ::ProxyGen::createServer ::WSOCK::chat ::T4STestWSock::chat