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: 10.4   10.5   11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1    Statistic    FMM    Blog  

ServerSocket.Start

Starts the server socket to answer queries from other applications.

Component Version macOS Windows Linux Server iOS SDK
ServerSocket 3.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes

Deprecated

This function was deprecated. Use WebHook functions instead.

MBS( "ServerSocket.Start"; Port; Login; Flags )   More

Parameters

Parameter Description Example
Port The network port of the server to use. 9000
Login The login secret. Server will only answer if the logins match. "Hello"
Flags Pass sum of flag values. 1+4

Result

Returns OK or error.

Description

Starts the server socket to answer queries from other applications.
You can send queries from FileMaker or other development tools. See examples for details.
This has nothing to do with a FileMaker Server. The plugin starts a socket which answers queries, so the current FileMaker instance becomes a kind of server.
On FileMaker Server it looks like you must have a paused script to give time to the plugin for processing requests.

With plugin version 3.3, we added FileMaker Go support. Please use Insert From URL Script Step with an URL like this: "http://" & Server & ":"& Port & "/" & Login & "/" & Type & "/" & Query. Target a text field for the result, disable to show a dialog and use
"Select entire contents" option. As browsers cache requests (e.g. Internet Explorer), you may want to add a random value to the request in order to avoid caching due to using same URL.

Possible flag values:
1Listen only for local connections.
2Block HTTP Access from e.g. FileMaker Go or Webviewer.
4Block requests from plugin with ServerSocket.Query.

FileMaker 13 Server does currently not like to execute scripts with 4.0 plugin.

Examples

Listen for local connections on port 12345

MBS( "ServerSocket.Start"; 12345; "secret"; 1 )

See also

Example Databases

Blog Entries

FileMaker Magazin

Created 18th August 2014, last changed 17th October 2021


ServerSocket.SetAllowedTypes - ServerSocket.Stop

Feedback: Report problem or ask question.




Links
MBS Xojo tutorial videos

Start Chat