Conversation Styles
The conversation style associated with the conversation indicates the style of data transfer to be used, two-way alternate or two-way simultaneous. A conversation that specifies a two-way alternate style of data transfer is also known as a half-duplex conversation. A conversation that specifies a two-way simultaneous style of data transfer is referred to as a full-duplex conversation.
When a full-duplex conversation is allocated to a session, a send-receive
relationship is established between the transaction programs connected
to the conversation, and a two-way alternate data transfer occurs
where information is transferred in both directions, one direction
at a time. Like a telephone conversation, one transaction program
calls the other, and they converse
, one transaction program
talking at a time, until a transaction program ends the conversation.
One transaction program issues verbs to send data, and the other transaction
program issues verbs to receive data. When it finishes sending data,
the sending transaction program can transfer send control of the conversation
to the receiving transaction program. One transaction program decides
when to end the conversation and informs the other when it has ended.
On a half-duplex conversation, only one of the two partner transaction programs has the right to send data at a time. That transaction program is in send state. The other transaction program has the responsibility to receive data. It is said to be in receive state. At specified times, the transaction programs exchange these duties. When the conversation is first set up, the client transaction is in send state and the server program is in receive state.
When a duplex conversation is allocated to a session, both transaction programs connected to the conversation are started in send-and-receive state, and a two-way simultaneous data transfer occurs where information is transferred in both directions at the same time. Both transaction programs can issue verbs to send and receive data simultaneously with no transfer of send control required. The conversation ends when both transaction programs indicate they are ready to stop sending data, and each transaction program has received the data sent by the partner. If an error condition occurs, one transaction program can decide to end both sides of the conversation abruptly.