Struct skylane::client::Connection
[−]
[src]
pub struct Connection { /* fields omitted */ }
Structure aggregating all information about connection. Precesses events and dispatches them to registered listeners.
Methods
impl Connection
[src]
fn new(socket: Socket) -> Connection
Constructs new Connection
.
fn get_socket(&self) -> Socket
Returns connection socket.
fn get_controller(&self) -> Controller
Returns new Controller
for the connection.
fn add_object(&mut self, id: ObjectId, object: Box<Object>)
Adds new object.
See Bundle::add_object
.
fn add_next_client_object(&mut self, object: Box<Object>) -> ObjectId
Adds new object.
See Bundle::add_next_client_object
.
fn remove_object(&mut self, id: ObjectId)
Removes object with given id
.
See Bundle::remove_object
.
fn process_events(&mut self) -> Result<(), SkylaneError>
Reads data from socket and dispatches messages to registered objects.