pub struct SyslogNetUdp { /* private fields */ }Expand description
A remote syslog server which works over plain UDP.
Implementations§
Source§impl SyslogNetUdp
impl SyslogNetUdp
Sourcepub fn new<P>(dest_addr: P, local: Option<P>) -> SyRes<Self>
pub fn new<P>(dest_addr: P, local: Option<P>) -> SyRes<Self>
Creates a new UDP connection to syslog server.
§Arguments
-
dest_addr- a server’s address in form “ip:port” -
local- a local bind address in format “ip:port”. Optional. If not set, then will bind to 0.0.0.0 i.e OS specific.
pub fn get_remote_addr(&self) -> &SocketAddr
pub fn get_bind_addr(&self) -> &SocketAddr
Trait Implementations§
Source§impl AsyncSyslogDestination for SyslogNetUdp
Available on crate feature build_async_tokio only.
impl AsyncSyslogDestination for SyslogNetUdp
Available on crate feature
build_async_tokio only.Source§impl AsyncSyslogTap<SyslogNetUdp> for AsyncTap<UdpSocket, SyslogNetUdp>
impl AsyncSyslogTap<SyslogNetUdp> for AsyncTap<UdpSocket, SyslogNetUdp>
Source§fn new(req_tap: SyslogNetUdp) -> SyRes<Self>
fn new(req_tap: SyslogNetUdp) -> SyRes<Self>
Proves the new instance of the syslog communication. Read more
Source§async fn connectlog(&mut self) -> SyRes<()>
async fn connectlog(&mut self) -> SyRes<()>
Opens a connection to target.
Source§async fn disconnectlog(&mut self) -> Result<()>
async fn disconnectlog(&mut self) -> Result<()>
Disconnects the connection.
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Tells if connection was opened.
Source§fn get_max_msg_size() -> usize
fn get_max_msg_size() -> usize
Returns (in bytes) the maximum message size (including headers).
Source§fn update_tap_data(&mut self, tap_data: SyslogNetUdp)
fn update_tap_data(&mut self, tap_data: SyslogNetUdp)
Updates the connection information without breaking tap.
Source§impl Clone for SyslogNetUdp
impl Clone for SyslogNetUdp
Source§fn clone(&self) -> SyslogNetUdp
fn clone(&self) -> SyslogNetUdp
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 moreSource§impl Debug for SyslogNetUdp
impl Debug for SyslogNetUdp
Source§impl Display for SyslogNetUdp
impl Display for SyslogNetUdp
Source§impl SyslogDestMsg for SyslogNetUdp
impl SyslogDestMsg for SyslogNetUdp
Source§fn get_max_msg_len() -> usize
fn get_max_msg_len() -> usize
Should return the max message length for specific syslog server type.
Source§impl SyslogDestination for SyslogNetUdp
Available on crate feature build_sync only.
impl SyslogDestination for SyslogNetUdp
Available on crate feature
build_sync only.const DEST_TYPE: DestinationType = DestinationType::Network
Source§type SocketTap = Tap<UdpSocket, SyslogNetUdp>
type SocketTap = Tap<UdpSocket, SyslogNetUdp>
A provider of the connection to syslog for sync code.
Auto Trait Implementations§
impl Freeze for SyslogNetUdp
impl RefUnwindSafe for SyslogNetUdp
impl Send for SyslogNetUdp
impl Sync for SyslogNetUdp
impl Unpin for SyslogNetUdp
impl UnwindSafe for SyslogNetUdp
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