0

I have a Red5 client implementation which publishes streams, loaded from video file to our wowza media server. The problem is that if stream name is to big - approximately more than 90 symbols - the client is not publishing it and fails silently. All others actions expected from client are fulfilled: it connects to server and creates a stream. But never publishes the stream. I dont see a corresponding RTMP message and I dont see a resulting reaction in the logs of wowza.

I tried to debug the client and tracked the execution until it starts to write to SocketChannel. Everything is the same for the cases of execution of shorter named stream (which publishes ok), and stream with the long name, which RTMP command "to publish" is never sent.

A questions are:

  1. whats up?

  2. if I have written some bytes to SocketChannel without any exceptions thrown - does it guarantees that the corresponding message was sent?

  3. if I have written some bytes to SocketChannel without any exceptions thrown - can I check by the means of my OS (MACOS in my case) whether the bytes were really written somewhere? Although I know, by the means of WireShark, that this piece of data was never sent.

UPDATE ...and which is even more strange - after sending "the big" packet sending a smaller one doesn't help. No packets can be sent after a packet of bigger length have been submitted to the socket.

KutaBeach
  • 1,445
  • 21
  • 43

1 Answers1

0

If I have written some bytes to SocketChannel without any exceptions thrown - does it guarantees that the corresponding message was sent?

It guarantees that the data has been buffered locally in the socket send buffer, up to the count returned by write(). Nothing more.

As you can't send further data, it sounds to me as though the receiver isn't reading the large piece of data. Is it possibly failing with an exception and ceasing to read altogether?

user207421
  • 305,947
  • 44
  • 307
  • 483
  • EJP, Wireshark tells me that the RTMP packet I have written to SocketChannel was never sent. So looks like this is a client-side problem. May be some OS buffer overflow?.. – KutaBeach Oct 07 '13 at 09:08
  • Or, you mean client may not send the packet, but _try to send it and fail on server side_, thus preventing Wireshark from putting down the stats? – KutaBeach Oct 07 '13 at 09:10