class SCTPConnectionlessSocket

SCTP Connectionless Socket. More...

Full nameCoral::SCTPConnectionlessSocket
Definition#include <sctpconnectionlesssocket.h>
InheritsCoral::SCTPSocket [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

This class manages a connectionless (UDP-style) SCTP socket. Internally, this class automatically establishs or accepts new SCTP associations.

 SCTPConnectionlessSocket (const bool sctpWait = false)

SCTPConnectionlessSocket

Constructor.

Parameters:
sctpWaittrue to wait for success of sctp_shutdown() (default); false otherwise.

 ~SCTPConnectionlessSocket ()

~SCTPConnectionlessSocket

Destructor.

int  receiveFrom (char* dataBuffer, size_t& dataBufferSize, char* controlBuffer, size_t& controlBufferSize, int& flags, unsigned short& streamID, unsigned int& protoID, SocketAddress*** addressArray, AssociationStatus& status)

receiveFrom

Receive data.

Parameters:
dataBufferBuffer to store data to.
dataBufferSizeSize of data buffer; this will be overwritten with actual size of data content.
controlBufferBuffer to store control data to.
controlBufferSizeSize of control buffer; this will be overwritten with actual size of control content.
flagsFlags; this will be overwritten with actual reception flags.
streamIDVariable to store stream ID to.
protoIDVariable to store protocol ID to.
addressArrayReference to store NULL-terminated array of peer addresses. The addresses are allocated automatically and have to be freed using deleteAddressList(). Set NULL to skip creation of the address array.
addressEntriesNumber of addressEntries; this will be overwritten by the sender's number of peer addresses.
statusVariable to store AssocationStatus data to.

Returns: error code (0 for success).

See also: SocketAddress#deleteAddressList

int  sendTo (const char* buffer, const size_t length, const int flags, const unsigned short streamID, const unsigned int protoID, const SocketAddress& destinationAddress)

sendTo

Send data.

Parameters:
bufferData to be sent.
lengthLength of data to be sent.
flagsFlags.
streamIDStream ID.
protoIDProtocol ID.
destinationAddressDestination address.

Returns: error code (0 for success).