TCP

In this section:

Reference:

Today, the Internet and World Wide Web (WWW) are familiar terms to millions of people all over the world. Many people depend on applications enabled by the Internet, such as electronic mail and web access. In addition, the increased popularity of business applications places additional emphasis on the Internet.

The Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite is the engine for the Internet and networks worldwide. Its simplicity and power makes it the single network protocol of choice in the world today.

This topic provides an overview of the TCP/IP protocol suite. Another name for it is the Internet Protocol Suite, which is the phrase used in the official Internet standards documents. iWay Software uses the more common acronym, TCP/IP, to refer to the entire protocol suite.

The main goal of TCP/IP was to build an interconnection of networks, referred to as an internetwork, or internet, that provided universal communication services over the internet.

The iWay Adapter for TCP provides bidirectional capability to and from TCP/IP destinations. It enables the iWay Protocol Adapter to receive messages on a TCP/IP port and route those messages back to a client or to another non-TCP destination. Similarly, messages received through the other iWay Service Manager listeners can be directed to a TCP/IP port. During the message flow, iWay Service Manager can apply standard document analysis, validation, transformation, and business logic capabilities to the document.


Top of page

x
Reference: TCP Listener Properties

The following table lists and describes the TCP listener properties. For instructions on creating a listener, see Configuring Listeners.

Property Name

Property Description

Port (required)

Socket number on which iWay Service Manager listens for incoming messages from a client application. The iWay Service Manager configuration tool requires that the port be numeric.

Local bind address

Local bind address for multi-homed hosts. Usually leave this value empty.

Allowable Client

If set, accepts messages only from this HOSTNAME or IP address.

Timeout

Timeout interval for the TCP socket.

Stream Length Encoded

The protocol needs to be able to recognize a complete message. Several methods are provided:

  • None (XML encoded). Looks for the end of the XML document.
  • 4 byte MSB. An integer precedes the message.
  • 2 byte LSB. An integer in LSB form precedes the message. This is often used for messages from mainframes.
  • 6 byte ASCII. Character encoded length precedes the message.
  • Non-XML. Complete message to socket close.

Persistent connection

If set to true, the connection is maintained until the client closes.

Note: If you use this option, length encoding must be enabled.

Whitespace Normalization

This specifies how the parser treats whitespace in element objects. Select preserve (default) to turn off all normalization as prescribed by the XML Specification. Select condense to remove extra whitespaces in pretty printed documents and for compatibility with earlier versions.

Accepts non-XML (flat) only

If set to true, the input data is sent directly to the business logic step. The data is not preparsed, parsed, or validated. This flag is used primarily to send non-XML to the business logic or replyTo without processing it.

Optimize Favoring

Use this option to customize how the listener performs. For smaller transactions, select performance. For large input documents that could monopolize the amount of memory used by iWay Service Manager, select memory.

Multithreading

This indicates the number of worker threads (documents or requests) that iWay Service Manager can handle in parallel. Setting this to a value of greater than 1 enables the listener to handle a second request while an earlier request is still being processed. The total throughput of a system can be affected by the number of threads operating. Increasing the number of parallel operations may not necessarily improve throughput.

Default: 1

Max Value: 99

Maximum Threads

Parallel threads can grow to this count automatically on demand. Over time, the worker count will decrease back to the multithreading level. Use this parameter to respond to bursts of activity.

Execution Time Limit

The maximum time that a request may take to complete. Used to prevent runaway requests. Any request that takes longer to complete than this value will be attempted to be terminated. (See the kill interval for related information in Global Options.)

Default Java File Encoding

The default encoding if an incoming message is not self-declaring (that is, XML).

Agent Precedence

This sets the order by which iWay Service Manager selects agents. iWay Service Manager selects the agent or agents to process the document by searching through the configuration dictionary. Usually, it looks for a document entry in the configuration and when a match is found, the agent specified in that document entry is selected. If a matching document entry is not found, or no agent is specified, the engine looks in the input protocol configuration (listener). To have the processing agent taken directly from the listener (thus ignoring the document entry), use <listener> overrides <document>.

Possible values are <document> overrides <listener> and <listener> overrides <document>.

The default value is: <document> overrides <listener>

Always reply to listener default

If set to true, the default reply definition is used in addition to define reply-to and error-to destinations.

Error Documents treated normally

If set to true, the error documents are processed by any configured preemitters.

Listener is Transaction Manager

If set to true, the agents run in a local transaction. Agents can roll back uncompleted transactions.

Record in Activity Log(s)

If set to true, then the activity on this channel will be recorded in the activity logs. If set to false, else the activity will not be recorded.



x
Reference: TCP Listener Special Registers

The following table lists and describes the special registers (SREGs) available on the TCP listener.

Name

Level

Type

Description

ip

Document

String

The IP address of the sender.

iwayconfig

System

String

The current active configuration name.

msgsize

Document

Integer

The physical length of the message payload.

name

System

String

The assigned name of the master (listener).

protocol

System

String

The protocol on which message was received.

source

Document

String

The originator of the message. Same as IP.

tid

Document

String

Unique transaction ID.



x
Configuring a TCP Emitter

Messages are sent to particular destinations at the completion of a workflow. The state of the document determines which destination is used. The order in which they are used cannot be predicted.

Note: Configuring a TCP emitter is not required if the emitter protocol is the same as the listener protocol.

To route an output document or error message to a protocol other than that of the outlet (listener), you must configure an emitter. For example, an application may send input over FTP but want to route the output to a TCP listener.



x
TCP Emitter Properties

The following table lists and describes the TCP emitter properties. For instructions on creating an emitter, see Configuring Emitters.

Property Name

Property Description

Destination (required)

The TCP host and port.

Stream Length Encoded

A form of length encoding for the TCP stream. Values include:

  • None (XML encoded). Looks for the end of the XML document.
  • 4 byte MSB. An integer precedes the message.
  • 2 byte LSB. An integer in LSB form precedes the message. This is often used for messages from mainframes.
  • 6 byte ASCII. Character encoded length precedes the message.
  • Non-XML. Complete message to socket close.

Set TCP No Delay

If set to true, then this parameter disables the Nagle Algorithm on the client socket. This results in a faster line turnaround at the expense of an increased number of packets.


iWay Software