Hololens/Lib/UdpSockets.cs
//###########################################################################################
/// <summary>
/// Close the connection to distant host. Indicate if the operation works by returning boolean.
/// It work as well if the socket is not connected (and return true).
/// </summary>
/// <returns> true : the socket is disconnected </returns>
Close the connection to distant host. Indicate if the operation works by returning boolean.
It work as well if the socket is not connected (and return true).
Close the connection to distant host . Indicate if the operation works by returning boolean . It work as well if the socket is not connected ( and return true ) .
public bool Close()
        {
            if (_connected)
            {
                _socket.Dispose();
                _socket = null;
                _connected = false;
                return true;
            }
            return false;
        }
public bool Close ( ) { if ( _connected ) { _socket . Dispose ( ) ; _socket = null ; _connected = false ; return true ; } return false ; }
Close the connection to distant host.
Close the connection to distant host .
true : the socket is disconnected
true : the socket is disconnected