Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Socket.SetReceiveBufferSize

Sets receive buffer size.

Component Version macOS Windows Linux Server iOS SDK
Socket 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Socket.SetReceiveBufferSize"; SocketID; Size )   More

Parameters

Parameter Description Example
SocketID The socket ID received by Socket.Connect function. $sock
Size The new buffer size to use. 256 * 1024

Result

Returns OK or error.

Description

Sets receive buffer size.
You may not need to change this ever.
If you don't read fast enough, data flow will go slower to have the buffer work.

Examples

Test setting buffer size value:

Set Variable [ $sock ; Value: MBS("Socket.NewTCPSocket") ]
#
Set Variable [ $defaultValue ; Value: MBS("Socket.GetReceiveBufferSize"; $sock) ]
Set Variable [ $v ; Value: MBS("Socket.SetReceiveBufferSize"; $sock; 1024 * 256) ]
Set Variable [ $newValue ; Value: MBS("Socket.GetReceiveBufferSize"; $sock) ]
Show Custom Dialog [ "Default: " & $defaultValue & ¶ & "Set to: " & $newValue ]
#
Set Variable [ $r ; Value: MBS("Socket.Close"; $sock) ]

See also

Release notes

Blog Entries

This function checks for a license.

Created 19th January 2021, last changed 19th January 2021


Socket.SetNewConnectionURL - Socket.SetSendBufferSize