Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
gsk_secure_soc_write() z/OS Cryptographic Services System SSL Programming SC14-7495-00 |
|
Writes data using a secure socket connection. Format
Parameters
ResultsThe function return value will be
the number of bytes written if no error is detected. Otherwise, it
will be a negative value representing one of the return codes listed
in the gskssl.h include file. These are some possible errors:
UsageThe gsk_secure_soc_write() routine writes data to a secure socket connection. SSL is a record-based protocol with a maximum record length of 16384 bytes. If the SSL V2 protocol is used, then the maximum length is 16384 minus the length of the SSL protocol headers. Application data larger than the size of an SSL record will be sent using multiple records. SSL supports multiple threads but only one thread at a time can call the gsk_secure_soc_write() routine for a given connection handle. Multiple concurrent threads can call gsk_secure_soc_write() if each thread has its own connection handle. SSL supports sockets in blocking mode and in non-blocking mode. When a socket is in non-blocking mode and the SSL record cannot be written to the socket, gsk_secure_soc_write() will return with GSK_ERROR_WOULD_BLOCK. The application must call gsk_secure_soc_write() again when the socket is ready to accept more data, specifying the same buffer address and buffer size as the original request. A new write request must not be initiated until the pending write request has been completed as indicated by a return value of 0. The application should not write data directly to the socket since this can cause SSL protocol errors if the application inadvertently intermixes its data with SSL protocol data. If the application must write data to the socket, it is responsible for synchronizing this activity with the peer application so that application data is not intermixed with SSL data. |
Copyright IBM Corporation 1990, 2014
|