An abstract SIGTRAN transport layer.
More...
#include <yatesig.h>
|
| enum | Transport {
None = 0
, Sctp
, Tcp
, Udp
,
Unix
} |
| |
An abstract SIGTRAN transport layer.
A an abstraction offering connectivity to a SIGTRAN transport
◆ Transport
◆ SIGTransport()
◆ attach()
Attach an user adaptation layer
- Parameters
-
| sigtran | SIGTRAN component to attach, can be NULL |
References sigtran().
◆ attached()
| virtual void attached |
( |
bool | hasUAL | ) |
|
|
protectedpure virtual |
Notification if the attached state changed
- Parameters
-
| hasUAL | True if an User Adaptation Layer is now attached |
◆ connected()
| virtual bool connected |
( |
int | streamId | ) |
const |
|
pure virtual |
Check if the network transport layer is connected
- Parameters
-
| streamId | Identifier of the stream to check if applicable |
- Returns
- True if the transport (and stream if applicable) is connected
◆ defPort()
| u_int32_t defPort |
( |
| ) |
const |
Get the default SCTP/TCP/UDP port used
- Returns
- Default protocol port, 0 if unknown, not set or no SIGTRAN attached
◆ getSocketParams()
Get sctp socket parameters.
- Parameters
-
| params | List of parameters to obtain |
| result | List of parameters to fill |
- Returns
- True if operation was successful, false if an error occurred
◆ hasThread()
| virtual bool hasThread |
( |
| ) |
|
|
inlinevirtual |
Check if the transport thread is still running
- Returns
- True if the thread is still running.
◆ initialize()
| virtual bool initialize |
( |
const NamedList * | config | ) |
|
|
inlinevirtual |
Configure and initialize the component and any subcomponents it may have
- Parameters
-
| config | Optional configuration parameters override |
- Returns
- True if the component was initialized properly
Reimplemented from SignallingComponent.
◆ notifyLayer()
Notify the SIGTRAN layer about transport status changes
- Parameters
-
◆ processMSG()
| bool processMSG |
( |
unsigned char | msgVersion, |
|
|
unsigned char | msgClass, |
|
|
unsigned char | msgType, |
|
|
const DataBlock & | msg, |
|
|
int | streamId ) const |
Send a complete message to the adaptation layer for processing
- Parameters
-
| msgVersion | Version of the protocol |
| msgClass | Class of the message |
| msgType | Type of the message, depends on the class |
| msg | Message data, may be empty |
| streamId | Identifier of the stream the message was received on |
- Returns
- True if the message was handled
◆ reconnect()
| virtual void reconnect |
( |
bool | force = false | ) |
|
|
inlinevirtual |
Force the underlaying transport to reconnect
- Parameters
-
| force | True to force transport socket reconnection |
◆ reliable()
| virtual bool reliable |
( |
| ) |
const |
|
pure virtual |
Check if transport layer is reliable
- Returns
- true if transport is reliable
◆ sigtran()
Get the SIGTRAN component attached to this transport
- Returns
- Pointer to adaptation layer or NULL
Referenced by attach().
◆ stopThread()
| virtual void stopThread |
( |
| ) |
|
|
inlinevirtual |
Stop the transport thread
◆ transmitMSG() [1/2]
| virtual bool transmitMSG |
( |
const DataBlock & | header, |
|
|
const DataBlock & | msg, |
|
|
int | streamId = 0 ) |
|
protectedpure virtual |
Transmit a prepared message to the network
- Parameters
-
| header | Message header, typically 8 octets |
| msg | Message data, may be empty |
| streamId | Identifier of the stream to send the data over |
- Returns
- True if the message was transmitted to network
◆ transmitMSG() [2/2]
| virtual bool transmitMSG |
( |
unsigned char | msgVersion, |
|
|
unsigned char | msgClass, |
|
|
unsigned char | msgType, |
|
|
const DataBlock & | msg, |
|
|
int | streamId = 0 ) |
|
protectedvirtual |
Transmit a message to the network
- Parameters
-
| msgVersion | Version of the protocol |
| msgClass | Class of the message |
| msgType | Type of the message, depends on the class |
| msg | Message data, may be empty |
| streamId | Identifier of the stream to send the data over |
- Returns
- True if the message was transmitted to network
◆ transportNotify()
Notification that a new incomming connection has been made NOTE newTransport needs to be destroyed if will not be used
- Parameters
-
| newTransport | The new created transport |
| addr | The newly created transport socket address |
- Returns
- True if the newTransport will be used.
References SIGTransport().
The documentation for this class was generated from the following file: