z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


TcpAbort

z/OS Communications Server: IP Sockets Application Programming Interface Guide and Reference
SC27-3660-00

Use the procedure shown in Figure 1 to shut down a specific connection immediately. Data sent by your application on the abended connection might be lost. TCP sends a reset packet to notify the foreign host that you have abended the connection, but there is no guarantee that the reset will be received by the foreign host.

Figure 1. TcpAbort example
   procedure TcpAbort
            (
                 Connection: ConnectionType;
        var    ReturnCode: integer
            );
            external;
Parameter
Description
Connection
The connection number, as returned by TcpOpen or TcpWaitOpen in the Connection field of the StatusInfoType record.
ReturnCode
Indicates success or failure of call. Possible return values are:
  • OK
  • ABNORMALcondition
  • FATALerror
  • NOsuchCONNECTION
  • NOTyetBEGUN
  • TCPipSHUTDOWN
  • SOFTWAREerror
  • REMOTEreset

The connection is fully terminated when you receive the notification CONNECTIONstateCHANGED with the NewState field set to NONEXISTENT.

For a description of Pascal return codes, see Table 1.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014