Yate
Public Member Functions
SctpSocket Class Reference

Abstract SCTP Socket. More...

#include <yateclass.h>

Inheritance diagram for SctpSocket:
Socket Stream

List of all members.

Public Member Functions

 SctpSocket ()
 SctpSocket (SOCKET fd)
virtual ~SctpSocket ()
virtual bool bindx (ObjList &addresses)=0
virtual bool connectx (ObjList &addresses)=0
virtual int sendTo (void *buffer, int length, int stream, SocketAddr &addr, int flags)=0
virtual Socketaccept (SocketAddr &addr)
virtual int sendMsg (const void *buf, int length, int stream, int &flags)=0
virtual int recvMsg (void *buf, int length, SocketAddr &addr, int &stream, int &flags)=0
virtual bool setStreams (int inbound, int outbound)=0
virtual bool subscribeEvents ()=0
virtual bool getStreams (int &inbound, int &outbound)=0
virtual bool setPayload (u_int32_t payload)=0

Detailed Description

Abstract SCTP Socket.

The SctpSocket interface provides access to SCTP specific functions


Constructor & Destructor Documentation

SctpSocket ( ) [inline]

Constructor

SctpSocket ( SOCKET  fd) [inline, explicit]

Constructor

Parameters:
fdFile descriptor of an existing handle
virtual ~SctpSocket ( ) [virtual]

Destructor


Member Function Documentation

virtual Socket* accept ( SocketAddr addr) [inline, virtual]

Accept an incoming connection

Parameters:
addrThe socket address of the incoming connection
Returns:
A new SctpSocket if an incoming connection was detected

Reimplemented from Socket.

virtual bool bindx ( ObjList addresses) [pure virtual]

Bind this socket to multiple addresses

Parameters:
addressesThe list of addresses (SocketAddr)
Returns:
True if the socket bind succeded
virtual bool connectx ( ObjList addresses) [pure virtual]

Connect this socket to multiple addresses

Parameters:
addressesthe list of addresses (SocketAddr)
Returns:
True if the socket connect succeded
virtual bool getStreams ( int &  inbound,
int &  outbound 
) [pure virtual]

Get the number of negotiated streams

Parameters:
inboundNumber of inbound streams
outboundNumber of outbound streams
Returns:
True if operation has succeded
virtual int recvMsg ( void *  buf,
int  length,
SocketAddr addr,
int &  stream,
int &  flags 
) [pure virtual]

Receive data from a connected socket

Parameters:
bufThe buffer where the data will be stored
lengthThe buffer length
addrGets the remote address from which the data was received
streamGets the stream number on which the data was read
flagsFlags, gets altered on return
Returns:
The number of bytes read
virtual int sendMsg ( const void *  buf,
int  length,
int  stream,
int &  flags 
) [pure virtual]

Send a buffer of data over a connected socket

Parameters:
bufThe data to send
lengthData length
streamThe stream number to send over
flagsFlags, gets altered on return
Returns:
The number of bytes sent
virtual int sendTo ( void *  buffer,
int  length,
int  stream,
SocketAddr addr,
int  flags 
) [pure virtual]

Send a message over a connected or unconnected socket

Parameters:
bufferBuffer for data transfer
lengthLength of the buffer
streamThe stream number
addrAddress to send the message to, if NULL will behave like send()
flagsOperating system specific bit flags that change the behaviour
Returns:
Number of bytes transferred, socketError() if an error occurred
virtual bool setPayload ( u_int32_t  payload) [pure virtual]

Set the SCTP payload protocol identifier (RFC 4960)

Parameters:
payloadPayload identifier code
Returns:
True if set successfully
virtual bool setStreams ( int  inbound,
int  outbound 
) [pure virtual]

Set the number of streams

Parameters:
inboundThe number of inbound streams
outboundThe number of outbound streams
Returns:
True if the number of streams was set
virtual bool subscribeEvents ( ) [pure virtual]

Subscribe to SCTP events This method should be called if we need to find from which stream the data came

Returns:
True if subscription has succeeded

The documentation for this class was generated from the following file: