2 * ioSock.h - socket-based I/O routines for SecureTransport tests
9 #include <Security/SecureTransport.h>
10 #include <sys/types.h>
17 * Opaque reference to an Open Transport connection.
22 * info about a peer returned from MakeServerConnection() and
23 * AcceptClientConnection().
38 extern OSStatus
MakeServerConnection(
41 int nonBlocking
, // 0 or 1
42 otSocket
*socketNo
, // RETURNED
43 PeerSpec
*peer
); // RETURNED
46 * Set up an otSocket to listen for client connections. Call once, then
47 * use multiple AcceptClientConnection calls.
49 OSStatus
ListenForClients(
51 int nonBlocking
, // 0 or 1
52 otSocket
*socketNo
); // RETURNED
55 * Accept a client connection. Call endpointShutdown() for each successful;
56 * return from this function.
58 OSStatus
AcceptClientConnection(
59 otSocket listenSock
, // obtained from ListenForClients
60 otSocket
*acceptSock
, // RETURNED
61 PeerSpec
*peer
); // RETURNED
64 * Shut down a connection.
66 void endpointShutdown(
70 * R/W. Called out from SSL.
73 SSLConnectionRef connection
,
74 void *data
, /* owned by
77 size_t *dataLength
); /* IN/OUT */
80 SSLConnectionRef connection
,
82 size_t *dataLength
); /* IN/OUT */
88 #endif /* _IO_SOCK_H_ */