Struct msg_transmitter::tcp::TCPMsgClient [−][src]
pub struct TCPMsgClient<T> { /* fields omitted */ }
Methods
impl<T> TCPMsgClient<T> where
T: DeserializeOwned + Serialize + Send + 'static + Clone,
[src]
impl<T> TCPMsgClient<T> where
T: DeserializeOwned + Serialize + Send + 'static + Clone,
pub fn new(addr: &str, client_name: &str) -> TCPMsgClient<T>
[src]
pub fn new(addr: &str, client_name: &str) -> TCPMsgClient<T>
addr is socket address. like: 127.0.0.1:6666. name is the client's name, to identity which client it is.
pub fn start_client<F>(
&self,
process_function: F
) -> Box<Future<Item = (), Error = ()> + Send + 'static> where
F: FnMut(T) -> Vec<T> + Send + Sync + 'static,
[src]
pub fn start_client<F>(
&self,
process_function: F
) -> Box<Future<Item = (), Error = ()> + Send + 'static> where
F: FnMut(T) -> Vec<T> + Send + Sync + 'static,
process_function receive a message from server and send a series of messages to server
Trait Implementations
impl<T: Debug> Debug for TCPMsgClient<T>
[src]
impl<T: Debug> Debug for TCPMsgClient<T>
Auto Trait Implementations
impl<T> Send for TCPMsgClient<T> where
T: Send,
impl<T> Send for TCPMsgClient<T> where
T: Send,
impl<T> Sync for TCPMsgClient<T> where
T: Sync,
impl<T> Sync for TCPMsgClient<T> where
T: Sync,