Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 9.4   9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1    Statistic    FMM    Blog  

Socket.SetSendBufferSize

Sets send buffer size.

Component Version macOS Windows Linux Server FileMaker iOS SDK
Socket 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Socket.SetSendBufferSize"; 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 send buffer size.
You may not need to change this ever.
If you send more data, the function may wait till enough data is sent, so it fits in the buffer. Or OS may automatically resize the buffer.

Examples

Test send buffer size:

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

See also

Release notes

  • Version 11.1
    • Added new socket functions to set send/receive buffer size: Socket.GetReceiveBufferSize, Socket.GetSendBufferSize, Socket.SetReceiveBufferSize, Socket.SetSendBufferSize.

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


Socket.SetReceiveBufferSize   -   Socket.SetTag

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins

Start Chat