I am trying to build a video streaming app with minimum delay "and some image processing is going to be done" for that I am capturing frames using openCV and sending the data of the mat object to the client who should be able to view them. these messages are large chunks of data 230399 bytes exactly for my current configuration I manged to send mat objects before and deserialize and view them using TCP stream sockets but I had problems with message boundaries so I moved to SCTP sockets but now the problem is I can't send messages of more than 1999 bytes of data. The code I am using for socket creation is
ServerSocketFileDiscriptor= socket( AF_INET, SOCK_STREAM,IPPROTO_SCTP );
bzero( (void *)&serverAddress, sizeof(serverAddress) );
serverAddress.sin_family = AF_INET;
serverAddress.sin_addr.s_addr = htonl( INADDR_ANY );
serverAddress.sin_port = htons(29008);
bind( ServerSocketFileDiscriptor(structsockaddr*)&serverAddress,sizeof(serverAddress) );
/* Maximum of 1 streams will be available per socket */
memset( &message, 0, sizeof(message) );
message.sinit_num_ostreams = 1;
message.sinit_max_instreams = 1;
message.sinit_max_attempts = 2;
setsockopt( ServerSocketFileDiscriptor, IPPROTO_SCTP, SCTP_INITMSG,
&message, sizeof(message) );
listen( ServerSocketFileDiscriptor, 5 );
and the code I am using to send messages is
int status=sctp_sendmsg( clientSocketFileDiscriptor, (void *)buffer, (size_t)strlen(mystr), NULL, 0, 0, 0, 0 /* stream */, 0, 0 );
cout <<status<<"....................................."<<endl;