pub struct Connection { /* private fields */ }
Expand description

Manages a TCP connection to a SIP server and handles message sending and receiving.

Implementations

Creates a new SIP client and opens the TCP connection to the server

  • sip_host - SIP server host/ip and port
  • E.g. “127.0.0.1:6001”
use sip2::Connection;
assert_eq!(Connection::new("JUNK0+..-*z$@").is_err(), true);

Shutdown the TCP connection with the SIP server.

Send a SIP message

Receive a SIP response.

Blocks until a response is received.

Shortcut for: self.send(msg); resp = self.recv();

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.