Added Server trait and implemented basic Server functionality for IrcServer.
This commit is contained in:
parent
4df7be1662
commit
2e2d411907
2 changed files with 49 additions and 3 deletions
|
@ -23,9 +23,9 @@ impl<T, U> Connection<T, U> where T: IrcWriter, U: IrcReader {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn send(&self, msg: Message) -> IoResult<()> {
|
||||
pub fn send(&self, message: Message) -> IoResult<()> {
|
||||
let mut send = self.writer.lock();
|
||||
try!(send.write_str(msg.into_string()[]));
|
||||
try!(send.write_str(message.into_string()[]));
|
||||
send.flush()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue