Increse input Buffer in WebSocket
Posted: Wed May 20, 2020 7:47 am
how can Increse input Buffer in WebSocket
8192 -> 32350
dont work ???? unpredictible results
Sometimes OK, mostly fails
winsock.c
dgorisek@inet.hr
8192 -> 32350
dont work ???? unpredictible results
Sometimes OK, mostly fails
winsock.c
Code: Select all
//----------------------------------------------------------------------------//
HB_FUNC( RECV ) // nSocket --> cResult
{
LPBYTE buffer = ( LPBYTE ) hb_xgrab( 8192 );
// WORD wLen = recv( hb_parni( 1 ), ( char * ) buffer, 8192, 0 ); // 8192
WORD wLen = recv( hb_parni( 1 ), ( char * ) buffer, 32350, 0 ); // 32350
// if( wLen < 10000 ) // socket errors = 10000 + ...
if( wLen < 32350 )
hb_storvclen( ( char * ) buffer, wLen, 2 );
else
hb_storvclen( "", 0, 2 );
hb_retni( wLen );
hb_xfree( buffer );
}
//----------------------------------------------------------------------------//