The Navision Socket Bus Adapter uses Microsoft Windows Sockets 2 to provide communication between two systems across networks, for example across the Internet, and independently of network protocols.
The Socket bus adapter is especially useful when your application transmits large documents that can be streamed efficiently.
Windows Sockets 2 can use any transport protocol, but the Navision Socket Bus Adapter uses TCP.
In Microsoft documentation, you can find the following description:
"Windows Sockets 2 follows the Windows Open System Architecture (WOSA) model; it defines a standard service provider interface (SPI) between the application programming interface (API), with its exported functions and the protocol stacks. It uses the sockets paradigm that was first popularized by Berkeley Software Distribution (BSD) UNIX."
Windows Sockets "... is an interface, not a protocol. As an interface, it is used to discover and utilize the communications capabilities of any number of underlying transport protocols. Because it is not a protocol, it does not in any way affect the bits on the wire, and does not need to be utilized on both ends of a communications link."
For more information about Windows Sockets 2, see the Microsoft documentation, for example in the Microsoft Developers' Network (MSDN) Library, or the Web site www.sockets.com.
Microsoft DOM (MSDOM) reads messages in a continuous loop rather than closing the read interface when it reaches the end tag of a well-formed XML document. That means that it relies on the protocols surrounding the transmitted message to tell it when to stop reading. This creates problems when you use Windows Sockets, as the Navision Socket Bus Adapter does, because the bus adapter uses TCP as its transport protocol, and the efficiency of its transmission depends on the size of the TCP windows, that is, the amount of received data (in bytes) that can be buffered at one time on a connection (Microsoft MSDN).
The combination of TCP, Windows Sockets and MSDOM means that when you send a message, or document, using the Navision Socket Bus Adapter, the bus adapter will open a connection and keep it open until it receives acknowledgement that the message has been received. At the same time, the recipient will not know when it has received all of the message packet because Windows Sockets does not automatically include that information in the message.
If the bus adapter had contained a protocol layer, the built-in protocol would have handled this in one of three ways:
By adding information about the length of the message (such as the content-length in HTTP 1.0).
By sending special characters that indicate the end of the message.
By causing the sending bus adapter to close the connection, which indicates the end of the sent message.
When you use the Navision Socket Bus Adapter, you cannot use protocols to handle this for you, so you must use the bus adapter interface properties and C/AL code instead.
Navision Socket Bus Adapter: Setting Up Interfaces
Code Example: Sending a Document
Code Example: Receiving a Document
The Navision Socket Bus Adapter Interface