Struct rustun::client::UdpClient
[−]
[src]
pub struct UdpClient(_);
A Client trait implementation which uses UdpTransport as the transport layer.
Methods
impl UdpClient
[src]
fn new<S: Spawn>(spawner: &S, server: SocketAddr) -> Self
Makes a future that results in a UdpClient
instance which communicates with server
.
If you want to customize the settings of UdpClient
,
please use with_transport
function instead.
fn with_transport<S: Spawn>(
spawner: &S,
server: SocketAddr,
transport: UdpTransport
) -> Self
spawner: &S,
server: SocketAddr,
transport: UdpTransport
) -> Self
Makes a future that results in a UdpClient
instance which communicates with server
.
The resulting UdpClient
uses transport
as the UDP transport layer.
Trait Implementations
impl Client for UdpClient
[src]
type CallRaw = UdpCallRaw
Future
type to handle a request/response transaction using RawMessage
.
type CastRaw = UdpCastRaw
Future
type to handle a indication transaction using RawMessage
.
fn call_raw(&mut self, message: RawMessage) -> Self::CallRaw
Makes a Future
that sends the raw request message to a server and waits the response from it. Read more
fn cast_raw(&mut self, message: RawMessage) -> Self::CastRaw
Makes a Future
that sends the raw indication message to a server.
fn call<M, A>(&mut self, message: Request<M, A>) -> Call<M, A, Self::CallRaw> where
M: Method,
A: Attribute,
M: Method,
A: Attribute,
Makes a Future
that sends the request message to a server and waits the response from it. Read more
fn cast<M, A>(&mut self, message: Indication<M, A>) -> Cast<Self::CastRaw> where
M: Method,
A: Attribute,
M: Method,
A: Attribute,
Makes a Future
that sends the indication message to a server.