Added concept of bot ownership, improved failure propagation.
This commit is contained in:
parent
3475437fdb
commit
352a692c9b
3 changed files with 13 additions and 8 deletions
|
@ -11,8 +11,7 @@ pub fn connect(host: &str, port: u16) -> IoResult<Connection> {
|
|||
fn send_internal(conn: &Connection, msg: &str) -> IoResult<()> {
|
||||
let &Connection(ref tcp) = conn;
|
||||
let mut writer = BufferedWriter::new(tcp.clone());
|
||||
writer.write_str(msg);
|
||||
writer.flush()
|
||||
writer.write_str(msg)
|
||||
}
|
||||
|
||||
pub fn send(conn: &Connection, msg: Message) -> IoResult<()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue