This project has retired. For details please refer to its Attic page.
Apache REEF: Org.Apache.REEF.Wake.Remote.Impl.Channel Class Reference
Apache REEF  0.15.0
Retainable Evaluator Execution Framework
Public Member Functions | List of all members
Org.Apache.REEF.Wake.Remote.Impl.Channel Class Reference

Performs low level network IO operations between hosts More...

Public Member Functions

 Channel (NetworkStream stream)
 Constructs a new Channel with the the connected NetworkStream. More...
 
void Write (byte[] message)
 Sends a message to the connected client synchronously More...
 
async Task WriteAsync (byte[] message, CancellationToken token)
 Sends a message to the connected client asynchronously More...
 
byte[] Read ()
 Reads an incoming message as a byte array synchronously. More...
 
async Task< byte[]> ReadAsync (CancellationToken token)
 Reads an incoming message as a byte array asynchronously. More...
 

Detailed Description

Performs low level network IO operations between hosts

Constructor & Destructor Documentation

Org.Apache.REEF.Wake.Remote.Impl.Channel.Channel ( NetworkStream  stream)
inline

Constructs a new Channel with the the connected NetworkStream.

Parameters
streamThe connected stream

Member Function Documentation

byte [] Org.Apache.REEF.Wake.Remote.Impl.Channel.Read ( )
inline

Reads an incoming message as a byte array synchronously.

The message length is read as the first four bytes.

Returns
The byte array message
async Task<byte[]> Org.Apache.REEF.Wake.Remote.Impl.Channel.ReadAsync ( CancellationToken  token)
inline

Reads an incoming message as a byte array asynchronously.

The message length is read as the first four bytes.

Parameters
tokenThe cancellation token
Returns
The byte array message
void Org.Apache.REEF.Wake.Remote.Impl.Channel.Write ( byte[]  message)
inline

Sends a message to the connected client synchronously

Parameters
messageThe message to send
async Task Org.Apache.REEF.Wake.Remote.Impl.Channel.WriteAsync ( byte[]  message,
CancellationToken  token 
)
inline

Sends a message to the connected client asynchronously

Parameters
messageThe message to send
tokenThe cancellation token
Returns
The awaitable write task

The documentation for this class was generated from the following file: