Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Configuration attributes in the SocketAdapter Configuration Property Sheet (CPS) with Expert Properties enabled are explained below.

Image Modified
Figure 1: SocketAdapter Configuration CPS

...

Tip

Refer Error Handling section in Common Configurations for detailed information.

CreateSocket?

 

  • Enable - Acts as a server by creating a socket on the specified port and listens to client connections

    Note

    Enabling this property

  • Disable - Acts as a client assuming that the server is already running on the specified port and connects to it.

...

Note
titleExamples of various patterns
Info
titleSingle Range - 192.168.1.0 to 192.168.1.99

 192.168.1.\b([0-9]|[0-9][0-9])\b

Info
titleMultiple Range - 192.168.1.0 to 192.168.1.100 & 192.168.1.101 to 192.168.1.200 & 192.168.1.201 to 192.168.1.255

 192.168.1.\b([0-9]|[0-9][0-9]|100)\b;192.168.1.\b(1[0-9][0-9])|200)\b;192.168.1.\b(2[0-4][0-9]|25[0-5])\b

Anchor
Close Idle Connections
Close Idle Connections
Close Idle Connections

When the Close idle connections check box is enabled, it acts as a server and closes inactive client connections based on the idle time which can be set for a session of connection specified in milliseconds.

Note

It is displayed only when the Create Socket option is enabled. 

Idle time (ms)

Idle time is the maximum time interval for the client to not to send a request to the server. If the time taken to send the request from the client is more than the idle time, the session is closed. A new session gets created only when the client is sending another request.

Note

If the value is zero, it waits infinitely for the session to be idle.

Image Added

Figure 11: Attributes to specify the Idle time

Functional Demonstration

The following Sample flow has two socket microservices, one acting as the server and the other as client. After receiving requests from the client, the server will send it to the SMTP component connected to its output port, and then the response from the SMTP component is, in turn, sent back to the client.

Image RemovedImage Added
Figure 1112: Sample Event Process

Scenario 1: Decode Type as 'Delimiter'

'SampleServer' Component Configuration is shown in the following figure.


Figure 1213: Socket Adapter Configuration in Server mode

'SampleClient' Component Configuration is shown in the following figure.


Figure 1314: Socket Adapter Configuration in Client mode

...

'SampleServer' Component Configuration is shown in the following figure.


Figure 1415: Socket Adapter Configuration in Server mode

'SampleClient' Component Configuration is shown in the following figure.


Figure 1516: Socket Adapter Configuration in Client mode

...

The following Sample flow has one socket adapter acting as client. After receiving requests from the client, the configured WSSStub (as Server) sends the response back to the client. In the client configuration, SuspendTimeout is 10 sec. If the client fails to receive response within the configured suspendtimeout (10 sec), then the next request message sent by client will be processed and a timeout error message is sent to the Error port of the client.

Image RemovedImage Added
Figure 1617: Sample Event Process


Figure 1718: Socket Adapter Configuration in Client mode for Synchronous Communication

Image Modified
Figure 1819: Sample Request

Image Modified
Figure 1920: Sample Response

Info

Is Synchronous? option can be used with any Decode Type (Delimiter/ Length/None).

...

Adaptavist ThemeBuilder EngineAtlassian Confluence