Struct msg_transmitter::uds::UDSMsgServer [−][src]
pub struct UDSMsgServer<T> { /* fields omitted */ }Methods
impl<T> UDSMsgServer<T> where
T: DeserializeOwned + Serialize + Send + 'static + Clone, [src]
impl<T> UDSMsgServer<T> where
T: DeserializeOwned + Serialize + Send + 'static + Clone, pub fn new(path_name: &str, server_name: &str) -> UDSMsgServer<T>[src]
pub fn new(path_name: &str, server_name: &str) -> UDSMsgServer<T>addr is socket address. like: 127.0.0.1:6666. name is the server's name, to identity which server it is.
pub fn start_server<F>(
&self,
first_msg: T,
process_function: F
) -> Box<Future<Item = (), Error = ()> + Send + 'static> where
F: FnMut(String, T) -> Vec<(String, T)> + Send + Sync + 'static + Clone, [src]
pub fn start_server<F>(
&self,
first_msg: T,
process_function: F
) -> Box<Future<Item = (), Error = ()> + Send + 'static> where
F: FnMut(String, T) -> Vec<(String, T)> + Send + Sync + 'static + Clone, first_msg is the first message that server send to the client which just connect to server. process_fuction receive a tuple of <client_name, message>, and return a series of tuple of <client_name,message> indicating which message sended to which client.
Trait Implementations
impl<T: Debug> Debug for UDSMsgServer<T>[src]
impl<T: Debug> Debug for UDSMsgServer<T>Auto Trait Implementations
impl<T> Send for UDSMsgServer<T> where
T: Send,
impl<T> Send for UDSMsgServer<T> where
T: Send, impl<T> Sync for UDSMsgServer<T> where
T: Send,
impl<T> Sync for UDSMsgServer<T> where
T: Send,