Here is my code:
public void getConnectedClientInfo(IClient client, RequestFunction function, AMFDataList params)
{
getLogger().info(“getConnectedClinetInfo retrieving info…”);
AMFDataArray retArray = new AMFDataArray();
AMFDataObj retObj = null;
IApplicationInstance applicationInstance = client.getAppInstance();
List streams = applicationInstance.getStreams().getPublishStreamNames();
MediaStreamMap msm = (MediaStreamMap) applicationInstance.getStreams();
List streamList = new ArrayList();
streamList = msm.getStreams();
if(streamList.size()>0) {
for(int i=0;i<streamList.size();i++)
getLogger().info(streamList.size()+ “…”+streamList.get(i).getClientId());
}
getLogger().info(“MSM COUNTER”+msm.getCount());
for(int i=0;i<streams.size();i++){
getLogger().info(streams.get(i)+" Streams size: "+streams.size());
retObj = new AMFDataObj();
if(streams.get(i)!=null) {
String str = new String(streams.get(i));
retObj.put(“room”, new AMFDataItem(str.substring(0,5)));
getLogger().info("Room number: "+str.substring(0,5));
String id = str.substring(str.lastIndexOf("_")+1,str.length());
retObj.put(“id”, new AMFDataItem(id));
getLogger().info("User id : "+id);
String printip = “”;
getLogger().info(streamList.get(i).getClient().getIp());
for(int a=0;a<streamList.size();a++){
int streamId = streamList.get(a).getClientId();
getLogger().info("Streams “+ id+” streamList: "+streamId);
if(streamId==new Integer(id)) {
String ip = (String) streamList.get(a).getClient().getIp();
printip = ip;
retObj.put(“ip”, new AMFDataItem(ip));
}
}
getLogger().info(“Room:”+str.substring(0,5)+" User ID:"+ id+" ip: "+printip);
}
retArray.add(retObj);
}
if(retArray!=null)
sendResult(client, params, retArray);
}
Here is the Wowza log
getConnectedClinetInfo retrieving info… - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - 4…1807759574 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - 4…1015236877 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - 4…1015236877 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - 4…1807759574 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - MSM COUNTER4 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - 99949_videoStream_1807759574 Streams size: 2 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Room number: 99949 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - User id : 1807759574 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - 192.168.1.68 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Streams 1807759574 streamList: 1807759574 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Streams 1807759574 streamList: 1015236877 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Streams 1807759574 streamList: 1015236877 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Streams 1807759574 streamList: 1807759574 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Room:99949 User ID:1807759574 ip: 192.168.1.68 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - 99949_videoStream_1015236877 Streams size: 2 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Room number: 99949 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - User id : 1015236877 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - 192.168.1.62 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Streams 1015236877 streamList: 1807759574 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Streams 1015236877 streamList: 1015236877 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Streams 1015236877 streamList: 1015236877 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Streams 1015236877 streamList: 1807759574 - - - 77.203 - - - - - - - - - - - - - - - - - - - - - - - - -
2010-02-11 14:37:19 NZDT comment server INFO 200 - Room:99949 User ID:1015236877 ip: 192.168.1.62