pub struct SipMessage {
pub direction: Direction,
pub transport: Transport,
pub address: String,
pub timestamp: Timestamp,
pub content: Vec<u8>,
pub frame_count: usize,
}Expand description
A reassembled SIP message (Level 2 output).
For TCP, consecutive frames from the same connection are concatenated and split by Content-Length. For UDP, each frame becomes one message (1:1).
Fields§
§direction: DirectionWhether this message was received or sent.
transport: TransportTransport protocol.
address: StringRemote address as ip:port.
timestamp: TimestampTimestamp of the first frame in this message.
content: Vec<u8>Reassembled message bytes (headers + body).
frame_count: usizeNumber of Level 1 frames that were reassembled into this message.
Implementations§
Source§impl SipMessage
impl SipMessage
Sourcepub fn parse(&self) -> Result<ParsedSipMessage, ParseError>
pub fn parse(&self) -> Result<ParsedSipMessage, ParseError>
Parse this reassembled message into a ParsedSipMessage with typed
access to the request/status line, headers, and body.
Trait Implementations§
Source§impl Clone for SipMessage
impl Clone for SipMessage
Source§fn clone(&self) -> SipMessage
fn clone(&self) -> SipMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for SipMessage
impl RefUnwindSafe for SipMessage
impl Send for SipMessage
impl Sync for SipMessage
impl Unpin for SipMessage
impl UnsafeUnpin for SipMessage
impl UnwindSafe for SipMessage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more