OSI/TS Configuration and Management Manual

NonStop Kernel File-System Interface
OSI/TS Configuration and Management Manual424831-001
7-33
Transferring Data
After the transport connection is established, your application can examine the
results of protocol negotiation by calling SETPARAM 10.
Transferring Data
After the connection-establishment phase is complete, your application can use
WRITE, READ, and WRITEREAD calls to send and receive data over the
transport connection. When issuing a call, make sure your application specifies
a buffer size large enough to accommodate the data to be sent or to be
received. Make sure no data-transfer requests are issued to the OSI/TS
subsystem until your application has confirmed that the connection-establishment
phase has ended.
If the connection allows expedited data, you can request OSI/TS to transfer your
data in an ED-TPDU. ED-TPDUs contain a maximum of 16 octets of user
data.
OSI/TS cannot signal the application asynchronously when it receives a request
from the remote peer. Therefore, the application must always have a READ
request pending to allow OSI/TS to pass information back to the application by
completing the READ.
If the transport connection is lost, OSI/TS returns file-system error 140 to the
application. The application issues SETPARAM 10 to retrieve the reason code.
Sending Data
You can use either WRITE or WRITEREAD calls to send data across a
transport connection. The Transport Layer recognizes either of these procedures
as T-DATA or T-EXPEDITED DATA request service primitives. To request a
data transfer, your application issues a call with the following syntax:
Table 7-6. Connection-Establishment Completion Codes
Code Significance
0 Successful operation.
12 A connection is already associated with the subdevice.
140 Connection handshake aborted (initiator only). Issue SETPARAM
for reason.
178 Remote NSAP address undefined (initiator only), or
Invalid NSAP-SNPA mapping for local or remote addresses, or
Trying to establish a LAN connection with class other than class
4.
CALL WRITE ( filenum, buffer, write-count );
or
CALL WRITEREAD ( filenum, buffer, write-count );