Answer for how to check client connection status?hillbun wrote:
I want to know how to: 1. how many clients are online, what’s ip, start time, stream name or streamalias name 2. client connections history, ip, start time, stop time, stream name 3. drop a online client. 4. limit a client’s bandwidth.1.) We don’t have means to check how many clients are currently online/connected to EMS, but we have ways to check the outbound streams corresponding possibly to the clients (record and pushstream create outbound streams also though). If you use listStreams, check the "type" parameter of the streams being shown. If: type="ONR" -> outbound rtmp type="ONP" -> outbound rtp type="ONTS" -> outbound ts If the type is one of these, then the corresponding stream might be considered as a client connected. For ip, you may check the far ip in listStreams. Start time, none. StreamName, check this also in liststreams (check localstreamname parameter). StreamAlias is also present in the listStreams command for its corresponding outboundstream, as long as the stream is still playing. After the stream has shut off, then it will consume the corresponding stream alias, and will no longer be available. 2.) you can only check the ip of the connections CURRENTLY connected to EMS together with this is the corresponding localstreamname for these connections. We don’t currently have a capability to show the start and stop time of a connection from client. 3.) you can drop an online client by doing these: a.) use listStreams command, look for the farIp for the corresponding outbound stream of the client streaming. Take note of the uniqueId parameter for this client. b.) use shutdownStream command with an id parameter, using uniqueId as the value for the id parameter. This will remove the corresponding outbound stream for that client. eg.) shutdownStream id=(uniqueId noted from liststreams) 4.) you can only limit the bandwidth for all inbound streams and for all outbound streams, not for a specific client. Please see setBandwidthLimit API command, it has in and out parameters which you can set so that you can limit the bandwidth being utilized.