ExtensionMethods.RequestAsync(TMessage) Method (Udp.Generic.UdpPeer(TMessage), TMessage, IPEndPoint, Int32)
From Tungsten Suite
Tungsten
|
|
ExtensionMethodsRequestAsyncTMessage Method (UdpGenericUdpPeerTMessage, TMessage, IPEndPoint, Int32) |
Sends a request to a generic Udp peer and waits for a response. Can be used along with, or in lieu of, the regular method of calling Write and handling the BytesReceived event.
Namespace: W.Net
Assembly: Tungsten.Net (in Tungsten.Net.dll) Version: 2.0.2
C#
public static Task<TMessage> RequestAsync<TMessage>( this UdpGenericUdpPeer<TMessage> peer, TMessage request, IPEndPoint remoteEndPoint, int msTimeout )
Parameters
- peer
- Type: W.NetUdpGenericUdpPeerTMessage
The W.Net.Udp.Generic.UdpPeer<TMessage> instance - request
- Type: TMessage
The request to be made to the server - remoteEndPoint
- Type: System.NetIPEndPoint
The IPEndPoint of the remote Udp peer - msTimeout
- Type: SystemInt32
The time to wait for a response
Type Parameters
- TMessage
[Missing <typeparam name="TMessage"/> documentation for "M:W.Net.ExtensionMethods.RequestAsync``1(W.Net.Udp.Generic.UdpPeer{``0},``0,System.Net.IPEndPoint,System.Int32)"]
Return Value
Type: TaskTMessagedefault(TMessage) if a timeout occurs, otherwise the server's response