Server Smalltalk Guide : Communications : Communication messages
Communication messages
Tip icon
To better understand this section, examine the samples SstHttpClientExample and SstHttpServerExample.
Communication messages are the basic element of sending and receiving for transports. All data supplied to and received from a transport must be in the form of communication messages. As such, their structure and format is highly transport-dependent. Typically messages are byte-based but transports which interface to system services such as external CORBA ORBs might be based on pointers to C memory.
All communication messages support the following logical concepts though in some cases they may not be directly implemented by the transport being used:
contents
The message contents.
header
The message header information.
sender
The sender of the message. Typically only valid for received messages.
flushAfterSend
A flag to indicate whether the transport should ensure immediate transmission of the entire message.
closeAfterSend
A flag to indicate whether the transport should attempt to release the resources used to send a message as soon as the message is sent. This typically incorporates a flush operation.
The contents and header of a message can be in any format as long as that format is understood by the transport being used. For example, for the HTTP transport, the header slot contains an actual HTTP header object and the contents may be a collection of bytes or a deferred computation such as a Block. It is the transport's job to convert communication messages into or from the so-called wire format/protocol required by the actual transport mechanism.
Last modified date: 04/20/2020