Struct opcua_server::comms::tcp_transport::TcpTransport
source · [−]pub struct TcpTransport { /* private fields */ }
Expand description
This is the thing that handles input and output for the open connection associated with the session.
Implementations
sourceimpl TcpTransport
impl TcpTransport
pub fn new(
certificate_store: Arc<RwLock<CertificateStore>>,
server_state: Arc<RwLock<ServerState>>,
address_space: Arc<RwLock<AddressSpace>>
) -> TcpTransport
sourcepub fn run(
connection: Arc<RwLock<TcpTransport>>,
socket: TcpStream,
looping_interval_ms: f64
)
pub fn run(
connection: Arc<RwLock<TcpTransport>>,
socket: TcpStream,
looping_interval_ms: f64
)
This is the entry point for the session. This function is asynchronous - it spawns tokio tasks to handle the session execution loop so this function will returns immediately.
sourcepub fn is_server_abort(&self) -> bool
pub fn is_server_abort(&self) -> bool
Test if the connection should abort
Trait Implementations
sourceimpl Transport for TcpTransport
impl Transport for TcpTransport
fn state(&self) -> TransportState
sourcefn finish(&mut self, status_code: StatusCode)
fn finish(&mut self, status_code: StatusCode)
Terminate the session and put the connection in a finished state
sourcefn client_address(&self) -> Option<SocketAddr>
fn client_address(&self) -> Option<SocketAddr>
Returns the address of the client (peer) of this connection
sourcefn session_manager(&self) -> Arc<RwLock<SessionManager>>
fn session_manager(&self) -> Arc<RwLock<SessionManager>>
Returns the session map for the connection
fn has_received_hello(&self) -> bool
fn is_finished(&self) -> bool
Auto Trait Implementations
impl RefUnwindSafe for TcpTransport
impl Send for TcpTransport
impl Sync for TcpTransport
impl Unpin for TcpTransport
impl UnwindSafe for TcpTransport
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more