Struct strymon_communication::Network [] [src]

pub struct Network { /* fields omitted */ }

Handle to the networking subsystem.

Currently, this handle only stores information about the externally reachable hostname of the current process. In the future, it might be backed by a dedicated networking thread to implement its methods. Thus it recommended to only initialize it once per process.

Methods

impl Network
[src]

[src]

Creates a new default network handle.

The hostname argument should be set to an externally reachable hostname of the current process. If it is None, this constructor will try to retrieve it by reading the STRYMON_COMM_HOSTNAME environment variable. If both the argument and the environment variable are missing, it falls back to "localhost".

[src]

Returns the configured externally reachable hostname of the current process.

impl Network
[src]

[src]

Connects to a socket returns two queue handles.

The endpoint socket is typically specified a (host, port) pair. The returned queue handles can be used to send and receive MessageBuf objects on that socket. Please refer to the transport module level documentation for more details.

[src]

Opens a new socket and returns a handle to receive incomming clients.

If the port is not specified, a random ephemerial port is chosen. Please refer to the transport module level documentation for more details.

impl Network
[src]

[src]

Connects to an remote procedure call server.

Please refer to the rpc module level documentation for more details.

[src]

Creates a new remote procedure call server.

If the port is not specified, a random ephemerial port is chosen. Please refer to the rpc module level documentation for more details.

impl Network
[src]

[src]

Serves the specified file on a ephemerial network port.

[src]

Downloads the file served at url and downloads it into path.

Trait Implementations

impl Clone for Network
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Network
[src]

[src]

Formats the value using the given formatter. Read more