Added Server trait and implemented basic Server functionality for IrcServer.

This commit is contained in:
Aaron Weiss 2014-11-02 18:39:00 -05:00
parent 4df7be1662
commit 2e2d411907
2 changed files with 49 additions and 3 deletions

View file

@ -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()
}