Hololens/Lib/UdpSockets.cs
//###########################################################################################
/// <summary>
/// Send a message to host using asynchronous method.
/// </summary>
/// <param name="b"> the message as byte array </param>
/// <param name="start"> the start index for reading the byte array </param>
/// <param name="len"> the length of byte array to read </param>
Send a message to host using asynchronous method.
Send a message to host using asynchronous method .
public async Task SendAsync(byte[] sequence, int start, int size)
        {
            if (size > sequence.Length - start) size = sequence.Length - start;
            await _outStream.WriteAsync(sequence, start, size);
            _outStream.Flush();
        }
public async Task SendAsync ( byte [ ] sequence , int start , int size ) { if ( size > sequence . Length - start ) size = sequence . Length - start ; await _outStream . WriteAsync ( sequence , start , size ) ; _outStream . Flush ( ) ; }
Send a message to host using asynchronous method.
Send a message to host using asynchronous method .
// if message length is bigger than byte array length from start index
sequence
byte[]
start
int
the start index for reading the byte array
the start index for reading the byte array
size
int
b
the message as byte array
the message as byte array
len
the length of byte array to read
the length of byte array to read