pub struct ServerTransactionData {
pub id: TransactionKey,
pub state: Arc<AtomicTransactionState>,
pub request: Arc<Mutex<Request>>,
pub last_response: Arc<Mutex<Option<Response>>>,
pub remote_addr: SocketAddr,
pub transport: Arc<dyn Transport>,
pub events_tx: Sender<TransactionEvent>,
pub cmd_tx: CommandSender,
pub cmd_rx: Arc<Mutex<CommandReceiver>>,
pub event_loop_handle: Arc<Mutex<Option<JoinHandle<()>>>>,
pub timer_config: TimerSettings,
}Expand description
Common data structure for both INVITE and non-INVITE server transactions.
This structure contains all the state required for implementing the server transaction state machines defined in RFC 3261 Section 17.2. It includes:
- Identity information (transaction key)
- State tracking (current transaction state)
- Message storage (original request, last response)
- Communication channels (transport, event channels, command channels)
- Timer configuration
Both ServerInviteTransaction and ServerNonInviteTransaction use this structure
as their core data store, while implementing different behavior around it.
Fields§
§id: TransactionKeyTransaction ID based on RFC 3261 transaction matching rules
state: Arc<AtomicTransactionState>Current transaction state (Trying/Proceeding, Completed, Confirmed, Terminated)
request: Arc<Mutex<Request>>Original request that initiated this transaction
last_response: Arc<Mutex<Option<Response>>>Last response sent by this transaction
remote_addr: SocketAddrRemote address to which responses are sent
transport: Arc<dyn Transport>Transport layer for sending SIP messages
events_tx: Sender<TransactionEvent>Channel for sending events to the Transaction User (TU)
cmd_tx: CommandSenderChannel for sending commands to the transaction’s event loop
cmd_rx: Arc<Mutex<CommandReceiver>>Channel for receiving commands in the transaction’s event loop
event_loop_handle: Arc<Mutex<Option<JoinHandle<()>>>>Handle to the transaction’s event loop task
timer_config: TimerSettingsConfiguration for transaction timers (T1, T2, etc.)
Trait Implementations§
Source§impl AsRefKey for ServerTransactionData
Allows access to the transaction key.
Required by the transaction runner for identification and logging.
impl AsRefKey for ServerTransactionData
Allows access to the transaction key. Required by the transaction runner for identification and logging.
Source§fn as_ref_key(&self) -> &TransactionKey
fn as_ref_key(&self) -> &TransactionKey
Source§impl AsRefState for ServerTransactionData
Allows access to the transaction state.
Required by the transaction runner to manage state transitions.
impl AsRefState for ServerTransactionData
Allows access to the transaction state. Required by the transaction runner to manage state transitions.
Source§fn as_ref_state(&self) -> &Arc<AtomicTransactionState>
fn as_ref_state(&self) -> &Arc<AtomicTransactionState>
Source§impl Debug for ServerTransactionData
impl Debug for ServerTransactionData
Source§impl Drop for ServerTransactionData
impl Drop for ServerTransactionData
Source§impl HasCommandSender for ServerTransactionData
Provides access to the command channel.
Required by the transaction runner to send commands to itself.
impl HasCommandSender for ServerTransactionData
Provides access to the command channel. Required by the transaction runner to send commands to itself.
Source§fn get_self_command_sender(&self) -> Sender<InternalTransactionCommand>
fn get_self_command_sender(&self) -> Sender<InternalTransactionCommand>
Source§impl HasTransactionEvents for ServerTransactionData
Provides access to the event channel.
Required by the transaction runner to send events to the Transaction User.
impl HasTransactionEvents for ServerTransactionData
Provides access to the event channel. Required by the transaction runner to send events to the Transaction User.
Source§fn get_tu_event_sender(&self) -> Sender<TransactionEvent>
fn get_tu_event_sender(&self) -> Sender<TransactionEvent>
Source§impl HasTransport for ServerTransactionData
Provides access to the transport layer.
Required by the transaction runner to send messages.
impl HasTransport for ServerTransactionData
Provides access to the transport layer. Required by the transaction runner to send messages.