pub struct SocketServer {
pub local_addr: String,
/* private fields */
}Fields§
§local_addr: StringImplementations§
Source§impl SocketServer
impl SocketServer
pub fn new() -> Self
pub fn new_with_config( protocol_type: ProtocolType, ip_address: String, port_no: usize, ip_version: IPAddressVersion, ) -> Self
pub fn set_config(&mut self, config: AddressParser)
pub fn set_buffer_size(&mut self, buffer_size: usize)
pub fn on_receive(&mut self, on_receive_data: fn(String, Vec<u8>))
pub fn on_new_client(&mut self, on_new_client: fn(String))
pub fn on_client_disconnect(&mut self, on_disconnet_client: fn(String))
pub fn on_error(&mut self, on_error: fn(SocketServerErrorType))
pub fn send(&mut self, peer_addr: String, data: Vec<u8>) -> bool
pub fn start(&mut self) -> bool
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SocketServer
impl RefUnwindSafe for SocketServer
impl Send for SocketServer
impl Sync for SocketServer
impl Unpin for SocketServer
impl UnwindSafe for SocketServer
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