home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Watch / Listen Media
Television (MyTV frontend and TV-Server)
IPTV/DVB-IP in MP: Support for http, rtp and udp
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="georgius" data-source="post: 728805" data-attributes="member: 107951"><p>It works little bit different (as I know). IPTV_SOCKET_BUFFER_SIZE specifies size of buffer for socket (in other words, Windows create its internal buffer of this size and attach it to socket, you don't have access to this buffer). In this buffer are written packets received from network. When you call recvfrom() it returns only first packet received (not all packets received) and memory in buffer is marked as free. With non-blocking sockets you have to call recvfrom() until it doesn't return SOCKET_ERROR and then you have to check if WSAGetLastError() is WSAEWOULDBLOCK, which means that are no data. With blocking sockets you just call recvfrom(). It doesn't return while no data received - this approach makes another problem with unresponsible thread because is blocked with recvfrom(). If you look in my code you'll see that I call Sleep(10) only when no data received or there is not space in my buffer.</p></blockquote><p></p>
[QUOTE="georgius, post: 728805, member: 107951"] It works little bit different (as I know). IPTV_SOCKET_BUFFER_SIZE specifies size of buffer for socket (in other words, Windows create its internal buffer of this size and attach it to socket, you don't have access to this buffer). In this buffer are written packets received from network. When you call recvfrom() it returns only first packet received (not all packets received) and memory in buffer is marked as free. With non-blocking sockets you have to call recvfrom() until it doesn't return SOCKET_ERROR and then you have to check if WSAGetLastError() is WSAEWOULDBLOCK, which means that are no data. With blocking sockets you just call recvfrom(). It doesn't return while no data received - this approach makes another problem with unresponsible thread because is blocked with recvfrom(). If you look in my code you'll see that I call Sleep(10) only when no data received or there is not space in my buffer. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Watch / Listen Media
Television (MyTV frontend and TV-Server)
IPTV/DVB-IP in MP: Support for http, rtp and udp
Contact us
RSS
Top
Bottom