|
|
This class manages a SCTP assocation. Note: The constructor is protected, a SCTP assocation can be created from an SCTP socket using associate() or accept().
See also: SCTPSocket, SCTPSocket#associate, SCTPSocket#accept
~SCTPAssociation ()
| ~SCTPAssociation |
Destructor.
unsigned int getID ()
| getID |
[const]
Get internal association ID.
Returns: Association ID.
bool getLocalAddresses (SocketAddress**& addressArray)
| getLocalAddresses |
Get local addresses.
Parameters:
addressArray | Reference to store NULL-terminated array of local addresses. The addresses are allocated automatically and have to be freed using deleteAddressList(). |
Returns: true, if addressEntries are sufficient; false otherwise.
See also: SocketAddress#deleteAddressList
bool getRemoteAddresses (SocketAddress**& addressArray)
| getRemoteAddresses |
Get remote addresses.
Parameters:
addressArray | Reference to store NULL-terminated array of local addresses. The addresses are allocated automatically and have to be freed using deleteAddressList(). |
Returns: true, if addressEntries are sufficient; false otherwise.
See also: SocketAddress#deleteAddressList
int receive (char* dataBuffer,
size_t& dataBufferSize,
char* controlBuffer,
size_t& controlBufferSize,
int& flags,
unsigned short& streamID,
unsigned int& protoID)
| receive |
Parameters:
dataBuffer | Buffer to store data to. |
dataBufferSize | Size of data buffer; this will be overwritten with actual size of data content. |
controlBuffer | Buffer to store control data to. |
controlBufferSize | Size of control buffer; this will be overwritten with actual size of control content. |
flags | Flags; this will be overwritten with actual reception flags. |
streamID | Variable to store stream ID to. |
protoID | Variable to store protocol ID to. |
Returns: error code (0 for success).
int send (const char* buffer,
const size_t length,
const int flags,
const unsigned short streamID,
const unsigned int protoID)
| send |
Send data.
Parameters:
buffer | Data to be sent. |
length | Length of data to be sent. |
flags | Flags. |
streamID | Stream ID. |
protoID | Protocol ID. |
Returns: error code (0 for success).
void shutdown ()
| shutdown |
Shutdown.
void abort ()
| abort |
Abort.
SCTPAssociation (SCTPSocket* socket,
const unsigned int associationID,
const bool sctpWait)
| SCTPAssociation |
[protected]