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.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Socket.AcceptNewConnection
Accepts a new connection and returns a new socket.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Socket | 3.1 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| SocketID | The socket ID received by Socket.Connect function. | $sock |
Result
Returns new Socket ID or error message.
Description
Accepts a new connection and returns a new socket.Examples
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
- Socket.Connect
- Socket.Listen
- Socket.SetDataAvailableHandler
- Socket.SetErrorHandler
- Socket.SetNewConnectionEvaluate
- Socket.SetNewConnectionHandler
- Socket.SetNewConnectionURL
Example Databases
- Network/HTTP Server hosted
- Network/HTTP Server local
- Network/Socket Test/Socket Test
- Network/TCP Send and Receive/TCP Receiver
Created 18th August 2014, last changed 26th January 2016
SocialRequest.addMultipartText - Socket.AddMembership
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins