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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

eturnValue (Output) - IF gsk_secure_soc_startRecv() completes synchronously (function return<br />

value equals GSK_OK), then this field is set to GSK_OK and field secure data transfer<br />

size indicates number of bytes received.<br />

errnoValue (Output) - When the operation has completed asynchronously and returnValue is<br />

GSK_ERROR_IO, this field will contain an errno further defining the failure.<br />

operationCompleted (Output) - If the operation is posted to the I/O completion port, this field is updated<br />

to indicate that the operation was a GSKSECURESOCSTARTRECV.<br />

secureDataTransferSize (Output) - Number of bytes received when gsk_secure_soc_startRecv() completes<br />

synchronously (return value equals GSK_OK).<br />

bytesAvailable Not used.<br />

operationWaitTime (Input) - A timeval structure which specifies the maximum time allowed for this<br />

operation to complete asynchronously.<br />

struct timeval {<br />

long tv_sec; /* second */<br />

long tv_usec; /* microseconds */<br />

};<br />

If this timer expires, the operation will be posted to the I/O completion port with<br />

errnoValue set to EAGAIN.<br />

If this field is set to zero, the operation’s asynchronous completion will not be timed.<br />

If socketDescriptor is closed before the operation completes or times out, the operation<br />

will be posted to the I/O completion port with errnoValue set to ECLOSED.<br />

The minimum operationWaitTime is 1 second. The microseconds field (tv_usec) in the<br />

timeval is not used and must be set to zero.<br />

postedDescriptor Not used - Must be set to zero.<br />

operationId (Input) - An identifier to uniquely identify this operation or a group of operations. It<br />

can be set with the return value from QsoGenerateOperationId() or with an<br />

application-defined value.<br />

This value is preserved but ignored by all <strong>APIs</strong> except QsoCancelOperation() and<br />

QsoIsOperationPending().<br />

reserved1 (Output) - Must be set to hexadecimal zeroes.<br />

reserved2 (Input) - Must be set to hexadecimal zeroes.<br />

Authorities<br />

No authorization is required.<br />

Return Values<br />

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

v GSK_OK - The function has completed synchronously. The Qso_OverlappedIO_t communications<br />

structure has been updated but nothing has nor will be posted to the I/O completion port for this<br />

operation. Inspect field secureDataTransferSize in the Qso_OverlappedIO_t communications structure<br />

to determine the number of bytes received.<br />

v GSK_AS400_ASYNCHRONOUS_RECV - The function has been started. When the function completes<br />

(or times out if operationWaitTime was specified), the Qso_OverlappedIO_t communications structure<br />

will be updated with the results and the I/O completion port will be posted.<br />

v If the function fails, possible values are:<br />

[GSK_INVALID_HANDLE]<br />

<strong>Secure</strong> <strong>Sockets</strong> <strong>APIs</strong> 53

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

Saved successfully!

Ooh no, something went wrong!