summaryrefslogtreecommitdiffstats
path: root/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client.rs b/src/client.rs
index 9dd5191..86c3857 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -39,4 +39,13 @@ impl Client {
None => fail!(),
}
}
+
+ pub fn write (&mut self, msg: Message) {
+ match self.connection {
+ Some(ref mut conn) => {
+ msg.write_protocol_string(conn);
+ },
+ None => fail!(),
+ }
+ }
}