class SctpSocket

Abstract SCTP Socket. More...

Contains pure virtuals
Full nameTelEngine::SctpSocket
Definition#include <yateclass.h>
InheritsTelEngine::Socket [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

The SctpSocket interface provides access to SCTP specific functions

inline  SctpSocket ()

SctpSocket

Constructor

inline explicit  SctpSocket (SOCKET fd)

SctpSocket

Constructor

Parameters:
fdFile descriptor of an existing handle

 ~SctpSocket ()

~SctpSocket

[virtual]

Destructor

bool  bindx (ObjList& addresses)

bindx

[pure virtual]

Bind this socket to multiple addresses

Parameters:
addressesThe list of addresses (SocketAddr)

Returns: True if the socket bind succeded

bool  connectx (ObjList& addresses)

connectx

[pure virtual]

Connect this socket to multiple addresses

Parameters:
addressesthe list of addresses (SocketAddr)

Returns: True if the socket connect succeded

int  sendTo (void* buffer, int length, int stream, SocketAddr& addr, int flags)

sendTo

[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

Reimplemented from Socket.

Socket*  accept (SocketAddr& addr)

accept

[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.

int  sendMsg (const void* buf, int length, int stream, int& flags)

sendMsg

[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

int  recvMsg (void* buf, int length, SocketAddr& addr, int& stream, int& flags)

recvMsg

[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

bool  setStreams (int inbound, int outbound)

setStreams

[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

bool  subscribeEvents ()

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

bool  getStreams (int& inbound, int& outbound)

getStreams

[pure virtual]

Get the number of negotiated streams

Parameters:
inboundNumber of inbound streams
outboundNumber of outbound streams

Returns: True if operation has succeded

bool  setPayload (u_int32_t payload)

setPayload

[pure virtual]

Set the SCTP payload protocol identifier (RFC 4960)

Parameters:
payloadPayload identifier code

Returns: True if set successfully


Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.