Struct comm::client::Client [] [src]

pub struct Client { /* fields omitted */ }

A Client handles receiving, processing, relaying, etc. of messages in the communication network. It internalizes all the complex logic that is specific to messaging, and exposes a few commands view a TaskSender and events via Events.

Methods

impl Client
[src]

[src]

Creates a new Client. address is the address of this client, i.e. where other clients should send messages intended for this client.

[src]

Starts a Client in its own thread and returns its task sender. This method consumes the Client, so all event listeners must be registered first.

[src]

Registers an event listener that should be sent every Event the client emits.

Trait Implementations

impl Handler for Client
[src]

[src]

Invoked when a message has been received via the event loop's channel.

[src]

Invoked when a timeout has completed.

[src]

Invoked when the socket represented by token is ready to be operated on. events indicates the specific operations that are ready to be performed. Read more

[src]

Invoked when EventLoop has been interrupted by a signal interrupt.

[src]

Invoked at the end of an event loop tick.