class SIGTransport

An abstract SIGTRAN transport layer. More...

Contains pure virtuals
Full nameTelEngine::SIGTransport
Definition#include <libs/ysig/yatesig.h>
InheritsTelEngine::SignallingComponent [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Types

Public Methods

Protected Methods


Detailed Description

A an abstraction offering connectivity to a SIGTRAN transport

enum Transport { None = 0, Sctp, Tcp, Udp, Unix, }

Transport

Type of transport used

inline SIGTRAN*  sigtran ()

sigtran

[const]

Get the SIGTRAN component attached to this transport

Returns: Pointer to adaptation layer or NULL

u_int32_t  defPort ()

defPort

[const]

Get the default SCTP/TCP/UDP port used

Returns: Default protocol port, 0 if unknown, not set or no SIGTRAN attached

bool  reliable ()

reliable

[const pure virtual]

Check if transport layer is reliable

Returns: true if transport is reliable

void  notifyLayer (SignallingInterface::Notification status)

notifyLayer

Notify the SIGTRAN layer about transport status changes

Parameters:
statusStatus to notify

bool  initialize (const NamedList* config)

initialize

[virtual]

Configure and initialize the component and any subcomponents it may have

Parameters:
configOptional configuration parameters override

Returns: True if the component was initialized properly

Reimplemented from SignallingComponent.

bool  connected (int streamId)

connected

[const pure virtual]

Check if the network transport layer is connected

Parameters:
streamIdIdentifier of the stream to check if applicable

Returns: True if the transport (and stream if applicable) is connected

void  attach (SIGTRAN* sigtran)

attach

Attach an user adaptation layer

Parameters:
sigtranSIGTRAN component to attach, can be NULL

bool  processMSG (unsigned char msgVersion, unsigned char msgClass, unsigned char msgType, const DataBlock& msg, int streamId)

processMSG

[const]

Send a complete message to the adaptation layer for processing

Parameters:
msgVersionVersion of the protocol
msgClassClass of the message
msgTypeType of the message, depends on the class
msgMessage data, may be empty
streamIdIdentifier of the stream the message was received on

Returns: True if the message was handled

void  reconnect (bool force = false)

reconnect

[virtual]

Force the underlaying transport to reconnect

Parameters:
forceTrue to force transport socket reconnection

bool  getSocketParams (const String& params, NamedList& result)

getSocketParams

[virtual]

Get sctp socket parameters.

Parameters:
paramsList of parameters to obtain
resultList of parameters to fill

Returns: True if operation was successful, false if an error occurred

bool  transportNotify (SIGTransport* newTransport, const SocketAddr& addr)

transportNotify

[virtual]

Notification that a new incomming connection has been made NOTE newTransport needs to be destroyed if will not be used

Parameters:
newTransportThe new created transport
addrThe newly created transport socket address

Returns: True if the newTransport will be used.

bool  hasThread ()

hasThread

[virtual]

Check if the transport thread is still running

Returns: True if the thread is still running.

void  stopThread ()

stopThread

[virtual]

Stop the transport thread

inline explicit  SIGTransport (const char* name = 0)

SIGTransport

[protected]

Constructor

Parameters:
nameDefault empty component name

void  attached (bool hasUAL)

attached

[protected pure virtual]

Notification if the attached state changed

Parameters:
hasUALTrue if an User Adaptation Layer is now attached

bool  transmitMSG (unsigned char msgVersion, unsigned char msgClass, unsigned char msgType, const DataBlock& msg, int streamId = 0)

transmitMSG

[protected virtual]

Transmit a message to the network

Parameters:
msgVersionVersion of the protocol
msgClassClass of the message
msgTypeType of the message, depends on the class
msgMessage data, may be empty
streamIdIdentifier of the stream to send the data over

Returns: True if the message was transmitted to network

bool  transmitMSG (const DataBlock& header, const DataBlock& msg, int streamId = 0)

transmitMSG

[protected pure virtual]

Transmit a prepared message to the network

Parameters:
headerMessage header, typically 8 octets
msgMessage data, may be empty
streamIdIdentifier of the stream to send the data over

Returns: True if the message was transmitted to network


Generated by: paulc on bussard on Mon Feb 10 13:15:47 2014, using kdoc 2.0a54.