srwalter / dbus-bytestream

Native D-Bus implementation for Rust
GNU Lesser General Public License v2.1
6 stars 4 forks source link

connection: hide mutability #5

Closed mathstuf closed 8 years ago

mathstuf commented 8 years ago

The mutability of the underlying constructs have nothing to do with the mutability of the connection itself. For example, sending a message does not change the connection itself, just the underlying OS primitives. To fix this, wrap the members of Connection in RefCell to hide this behavior.

Also, sending a message takes the ownership of the message.

mathstuf commented 8 years ago

All tests passed except the TCP tests because I've been unable to get a TCP-based daemon to not spit back unrelated errors.