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
I think you should not connect to port 5080 but to port 1935 by default