Red5 Client 调用 Red5 Server

Red5 Client 调用 Red5 Server

文章分类:Java编程
package com.conjs; 

import org.red5.server.api.service.IPendingServiceCall; 
import org.red5.server.api.service.IPendingServiceCallback; 
import org.red5.server.net.rtmp.RTMPClient; 

public class Red5 extends RTMPClient { 
public static void main(String[] args) { 
String host = "localhost"; 
String app = "test"; 
int port = 1935; 
final Red5 client = new Red5(); 

IPendingServiceCallback callback = new IPendingServiceCallback() { 
@SuppressWarnings("unchecked") 
public void resultReceived(IPendingServiceCall call) { 
java.util.Map<String, String> re = (java.util.Map<String, String>) call.getResult(); 
System.out.println("level:" + re.get("level")); 
System.out.println("description:" + re.get("description")); 
System.out.println("code:" + re.get("code")); 

}; 
client.connect(host, port, app, callback); 


}

你可能感兴趣的:(Red5 Client 调用 Red5 Server)