22.10.2013 Views

System i: Programming Secure Sockets APIs - IBM

System i: Programming Secure Sockets APIs - IBM

System i: Programming Secure Sockets APIs - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

writeBuffer (Input)<br />

The pointer to the user-supplied buffer from which the data is to be written.<br />

writeBufSize (Input)<br />

The number of bytes to be written.<br />

amtWritten (Output)<br />

The number of bytes written as a result of this API call.<br />

Authorities<br />

No authorization is required.<br />

Return Value<br />

gsk_secure_soc_write() returns an integer. Possible values are:<br />

[GSK_OK]<br />

gsk_secure_soc_write() was successful.<br />

[GSK_INVALID_HANDLE]<br />

The handle specified was not valid.<br />

[GSK_INVALID_STATE]<br />

The handle is not in the correct state for this operation.<br />

[GSK_INVALID_BUFFER_SIZE]<br />

The readBufSize is less than 1.<br />

[GSK_WOULD_BLOCK]<br />

Operation would have caused the process to be suspended.<br />

[GSK_ERROR_SOCKET_CLOSED]<br />

A close() was done on the socket descriptor for this secure session.<br />

[GSK_AS400_ERROR_CLOSED]<br />

The secure session was closed by another thread before the write completed.<br />

[GSK_AS400_ERROR_INVALID_POINTER]<br />

The writeBuffer or amtWritten pointer is not valid.<br />

[GSK_INTERNAL_ERROR]<br />

An unexpected error occurred during SSL processing.<br />

[GSK_ERROR_IO]<br />

An error occurred in SSL processing; check the errno value.<br />

Error Conditions<br />

When the gsk_secure_soc_write() API fails with return code [GSK_ERROR_IO], errno can be set to:<br />

[EIO]<br />

[ENOTCONN]<br />

[ENOTSOCK]<br />

Input/output error.<br />

Requested operation requires a connection.<br />

<strong>Secure</strong> <strong>Sockets</strong> <strong>APIs</strong> 61

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!