Increase a recive buffer in UDP socket

Posted by unresolved_external on Stack Overflow See other posts from Stack Overflow or by unresolved_external
Published on 2012-12-08T22:56:15Z Indexed on 2012/12/08 23:03 UTC
Read the original article Hit count: 150

Filed under:
|
|

I'wm writing an app, which transmits video and obviously uses UDP protocol fot this purpose. So I am wondering how can I increase a size of send/recieve buffer, cause currently the maximal size of data, which I can send is 65000 bytes. I already tried to do it in following way:

int option = 262144;
if(setsockopt(m_SocketHandle,SOL_SOCKET,SO_RCVBUF ,(char*)&option,sizeof(option)) < 0)
{
    printf("setsockopt failed\n");

}

But it did not work. So how can I do it?

© Stack Overflow or respective owner

Related posts about c++

Related posts about sockets