Hololens/Lib/UdpSockets.cs
//###########################################################################################
/// <summary>
/// Connection to the distant host. Close the socket if it's already connected.
/// </summary>
/// <returns></returns>
Connection to the distant host. Close the socket if it's already connected.
Connection to the distant host . Close the socket if it ' s already connected .
private async Task Connect()
        {
            if (_connected) Close();
            var local_ip = LocalIp();
            var endpoint = new EndpointPair(new HostName(local_ip), _port, _host, _port);
            await _socket.ConnectAsync(endpoint);
            _outStream = _socket.OutputStream.AsStreamForWrite();
            await ConnectRequest();
        }
private async Task Connect ( ) { if ( _connected ) Close ( ) ; var local_ip = LocalIp ( ) ; var endpoint = new EndpointPair ( new HostName ( local_ip ) , _port , _host , _port ) ; await _socket . ConnectAsync ( endpoint ) ; _outStream = _socket . OutputStream . AsStreamForWrite ( ) ; await ConnectRequest ( ) ; }
Connection to the distant host.
Connection to the distant host .
// check the local ip for creating EndpointPair that link the socket and the distant host // build the link and get the output strem for sending message // try to connect
None