System i: Programming Secure Sockets APIs - IBM
System i: Programming Secure Sockets APIs - IBM
System i: Programming Secure Sockets APIs - IBM
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
gsk_secure_soc_startRecv()—Start asynchronous receive operation on<br />
a secure session<br />
Syntax<br />
#include <br />
#include <br />
int gsk_secure_soc_startRecv (gsk_handle my_session_handle,<br />
int IOCompletionPort,<br />
Qso_OverlappedIO_t * communicationsArea)<br />
Service Program Name: QSYS/QSOSSLSR<br />
Default Public Authority: *USE<br />
Threadsafe: Yes<br />
The gsk_secure_soc_startRecv() function is used to initiate an asynchronous receive operation on a secure<br />
session. The supplied receive buffer cannot be reused by the calling application until the receive is<br />
complete or the I/O completion port specified on the gsk_secure_soc_startRecv() has been destroyed.<br />
This API supports sockets with an address family of AF_INET or AF_INET6 and type SOCK_STREAM<br />
only.<br />
Parameters<br />
my_session_handle (Input)<br />
The handle, returned from gsk_secure_soc_open() and used on the gsk_secure_soc_init() API call<br />
that initialized the secure session over which data is to be read.<br />
int IOCompletionPort (Input)<br />
The I/O completion port that should be posted when the operation completes.<br />
Qso_OverlappedIO_t * communicationsArea (Input/Output)<br />
A pointer to a structure that contains the following information:<br />
descriptorHandle (Input) - The descriptor handle is application specific and is never used by the system.<br />
This field is intended to make it easier for the application to keep track of information<br />
regarding a given socket connection.<br />
buffer (Input) - A pointer to a buffer into which data should be read.<br />
bufferLength (Input) - The length of the buffer into which data should be read. Also represents the<br />
amount of data requested.<br />
postFlag (Input) - The postFlag indicates if this operation should be posted to the I/O<br />
completion port even if it completes immediately.<br />
v A 0 value indicates that if the operation is already complete upon return to the<br />
application, then do not post to the I/O completion port.<br />
v A 1 value indicates that even if the operation completes immediately upon return to<br />
the application, the result should still be posted to the I/O completion port.<br />
postFlagResult (Output) - This field is valid if gsk_secure_soc_startRecv() returns with 1 and postFlag<br />
was set to 1. In this scenario, postFlagResult set to 1 denotes the operation completed<br />
and been posted to the I/O completion port specified. A value of 0 denotes the<br />
operation could not be completed immediately, but will be handled asynchronously.<br />
fillBuffer (Input) - The fillBuffer flag indicates when this operation should complete. If the<br />
fillBuffer flag is 0, then the operation will complete as soon as any data is available to<br />
be received. If the fillBuffer flag is non-zero, this operation will not complete until<br />
enough data has been received to fill the buffer, an end-of-file condition occurs on the<br />
socket, or an error occurs on a socket.<br />
52 <strong>System</strong> i: <strong>Programming</strong> <strong>Secure</strong> <strong>Sockets</strong> <strong>APIs</strong>