Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
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:
1 | Listen only for local connections. |
2 | Block HTTP Access from e.g. FileMaker Go or Webviewer. |
4 | Block 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
- Network/ServerSocket/Server
- Network/ServerSocket/ServerSocket from Webviewer/ServerSocket from Webviewer
Blog Entries
- FileMaker and WebViewer communication
- MBS Filemaker Plugin, version 3.3pr6
- MBS Filemaker Plugin, version 3.3pr1
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 17th October 2021