Red5 Java客户端连接
我正在尝试为red5应用程序实现一个java客户端,它实现了一个简单的视频聊天。我为该应用程序实现了一个 Flash 客户端,并且使用 Flash 客户端一切正常。 对于java客户端,我尝试使用RTMPClient类建立与服务器的连接。在服务器端没有发生任何事情,客户端产生以下输出。
java版本:1.6 red5版本:1.0.0
连接red5服务器的代码:
RTMPClient c = new RTMPClient();
c.connect("server", 5080, "app");
输出java客户端:
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaIoHandler - Session created
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPClientConnManager - Creating connection, class: org.red5.server.net.rtmp.RTMPMinaConnection
[NioProcessor-2] DEBUG org.red5.server.BaseConnection - New BaseConnection - type: persistent
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaConnection - RTMPMinaConnection created
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPClientConnManager - Connection id set 1
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPClientConnManager - Connection added to the map
[NioProcessor-2] DEBUG o.r.server.net.rtmp.RTMPConnection - Set state: RTMP [state=connect, client-mode=true, debug=false, encrypted=false, lastReadChannel=0, lastWriteChannel=0, readHeaders={}, writeHeaders={}, readPacketHeaders={}, readPackets={}, writePackets={}, writeTimestamps={}, liveTimestamps={}, readChunkSize=128, writeChunkSize=128, encoding=AMF0]
[NioProcessor-2] DEBUG o.red5.server.net.rtmp.RTMPHandshake - Handshake ctor
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaIoHandler - Session opened
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaIoHandler - Handshake - client phase 1
[NioProcessor-2] DEBUG o.red5.server.net.rtmp.RTMPHandshake - generateClientRequest1
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaIoHandler - messageSent
[NioProcessor-2] DEBUG o.r.server.net.rtmp.BaseRTMPHandler - Message sent
提前谢谢
I am trying to implement a java client for a red5 application, which implements a simple video chat. I implemented a flash client for the application and with the flash client everything works fine.
For the java client I tried to use the RTMPClient class to establish a connection to the server. On the server side nothing happened and the client produced the following output.
java version: 1.6
red5 version: 1.0.0
code to connect to red5 server:
RTMPClient c = new RTMPClient();
c.connect("server", 5080, "app");
output java client:
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaIoHandler - Session created
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPClientConnManager - Creating connection, class: org.red5.server.net.rtmp.RTMPMinaConnection
[NioProcessor-2] DEBUG org.red5.server.BaseConnection - New BaseConnection - type: persistent
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaConnection - RTMPMinaConnection created
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPClientConnManager - Connection id set 1
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPClientConnManager - Connection added to the map
[NioProcessor-2] DEBUG o.r.server.net.rtmp.RTMPConnection - Set state: RTMP [state=connect, client-mode=true, debug=false, encrypted=false, lastReadChannel=0, lastWriteChannel=0, readHeaders={}, writeHeaders={}, readPacketHeaders={}, readPackets={}, writePackets={}, writeTimestamps={}, liveTimestamps={}, readChunkSize=128, writeChunkSize=128, encoding=AMF0]
[NioProcessor-2] DEBUG o.red5.server.net.rtmp.RTMPHandshake - Handshake ctor
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaIoHandler - Session opened
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaIoHandler - Handshake - client phase 1
[NioProcessor-2] DEBUG o.red5.server.net.rtmp.RTMPHandshake - generateClientRequest1
[NioProcessor-2] DEBUG o.r.s.net.rtmp.RTMPMinaIoHandler - messageSent
[NioProcessor-2] DEBUG o.r.server.net.rtmp.BaseRTMPHandler - Message sent
Thx in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为默认情况下你不应该连接到端口 5080 而应连接到端口 1935
I think you should not connect to port 5080 but to port 1935 by default