WebSocketConnector

Connects to a WebSocket server to send or receive messages.

Jump to Configuration

Typical Uses

  • Receive messages from WebSocket Servers
  • Send messages to WebSocket Servers
  • Connect to FME Flow WebSocket Servers

How does it work?

The first input feature will cause the WebSocketConnector to initialize a connection to the specified WebSocket Server URL.

When Request > Action is Send, the specified Data to Transmit value will be sent to the WebSocket server for every input feature, including the first feature that initiated the connection.

When Request > Action is Receive, a feature will be produced each time a message is received, with the contents of the message in the _output attribute. Each incoming feature will cause the WebSocketConnector to initialize a connection to the specified WebSocket server. The transformer will block while it waits to receive WebSocket messages until the remote host closes the connection.

When Receive Mode is Batch, each input feature will only block until the specified number of messages is received. If set to Stream, the transformer will continue running until the host closes the connection.

Configuration

Input Ports

Output Ports

Parameters

The remaining parameters available depend on the value of the Request > Action parameter. Parameters for each Action are detailed below.

Editing Transformer Parameters

Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.

Defining Values

There are several ways to define a value for use in a Transformer. The simplest is to simply type in a value or string, which can include functions of various types such as attribute references, math and string functions, and workspace parameters. There are a number of tools and shortcuts that can assist in constructing values, generally available from the drop-down context menu adjacent to the value field.

Dialog Options - Tables

Transformers with table-style parameters have additional tools for populating and manipulating values.

Reference

Processing Behavior

Feature-Based

Feature Holding

No

Dependencies  
Aliases  
History  

FME Community

The FME Community is the place for demos, how-tos, articles, FAQs, and more. Get answers to your questions, learn from other users, and suggest, vote, and comment on new features.

Search for all results about the WebSocketConnector on the FME Community.

 

Examples may contain information licensed under the Open Government Licence – Vancouver and/or the Open Government Licence – Canada.