Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 7.4   7.5   8.0   8.1   8.2   8.3   8.4   8.5   9.0   9.1    Statistic  


Accepts a new connection and returns a new socket.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Socket 3.1 Yes Yes Yes Yes Yes
MBS( "Socket.AcceptNewConnection"; SocketID )   More


Parameter Description Example value
SocketID The socket ID received by Socket.Connect function. $sock


Returns new Socket ID or error message.


Accepts a new connection and returns a new socket.


In the script triggered for a new connection, connect a new socket:

Set Variable [$sock; Value:Get(ScriptParameter)]
Set Variable [$newSock; Value:MBS("Socket.AcceptNewConnection"; $sock)]
If [GetAsNumber($newSock)>0]
    Set Variable [$r; Value:MBS("Socket.SetErrorHandler"; $newsock; Get(FileName); "SocketError")]
    Set Variable [$r; Value:MBS("Socket.SetDataAvailableHandler"; $newsock; Get(FileName); "ReadSomething")]
End If

See also

Example Databases

Created 18th August 2014, last changed 26th January 2016

SocialRequest.addMultipartText   -   Socket.AddMembership

Feedback: Report problem or ask question.

MBS Xojo PDF Plugins