You received this message because you are subscribed to "C++ RTMP Server" mailing list.
To post to this group, send email to c-rtmp...@googlegroups.com
To unsubscribe from this group, send email to
c-rtmp-serve...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/c-rtmp-server?hl=en
As far as I see, you are walking towards completion very fast and reliable. As far as I see, is not that hard to bring win build up to floating line :)
So, after you finish the changes, you may want to give me the patch so I can commit the changes into the repo so everybody can benefit
Best regards,
Andrei
You received this message because you are subscribed to "C++ RTMP Server" mailing list.
WSASendMsg is ***critical*** for the good functioning of the RTSP. WSASendMsg is used to send sparse buffers much like unix sendmsg().
A sparse buffer is actually a collection of memory regions each having a length. For example:
address 0x12340 - 56 bytes
address 0x88880 - 2 bytes
address 0x10000 - 30 bytes
That is an example of a sparse buffer. We need to send all of those buffer in the SAME UDP packet. Calling sendto() 3 times is NOT going to work because the RTP over UDP is packet aligned. Imagine that the UDP buffer I have to send is comprised of those 3 buffers all together. If you use sendto() 3 times, the player will see the packet of 56 bytes and it will consider the A/V packet as being complete. Needless to say, nothing will work :(
Also, you CAN'T send more than MTU bytes over a UDP packet. Theoretically, a UDP packet can not hold more than 65536-N bytes, where N are the bytes used by the ARP and IP layers from the stack (few tens). Another real world bottleneck is that the MTU. Even if you try to send 64000 bytes, that is not going to work either. Behind your back, the first router will chop the packet into multiple MTU size UDP packets, rendering your information useless for protocols like RTSP.
Fortunately, I already take care of the MTU problem and I'm never sending more than 1500 bytes per packet which is the standard MTU over LAN-connected internet connections. For ADSL based connections, that is even smaller (500-600 bytes)
Now you know why I dislike windows so much. sendmsg() was there for AGES in unix world, while the smart people at MSFT considered it useless for the past decade and only added WSASendMsg in later versions of windows (win vista I think...). That's embarrassing for them...
Also, there is yet another problem with UDP sockets. Believe it or not, I get a CONNRESET error on a UDP socket and that socket can't be used anymore. And, again, believe it or not, that is there from the win2k times. Here is a link with, again embarrassing for them, workaround (which doesn't work either, I still get that error!!!)
http://support.microsoft.com/kb/263823
That is absolutely hilarious...
Best regards,
Andrei