Hololens/Lib/UdpSockets.cs
//###########################################################################################
/// <summary>
/// Build the sequence that must be send to the host to reach.
/// </summary>
Build the sequence that must be send to the host to reach.
Build the sequence that must be send to the host to reach .
private void BuildConnectSequence()
        {
            string[] str_ip = LocalIp().Split('.');
            byte[] byte_ip = new byte[4];
            for (int n = 0; n < 4; n++) 
            {
                byte_ip[n] = Byte.Parse(str_ip[n]);
                _connect_sequence[n] = byte_ip[n];
            }
            int int_port = Int32.Parse(_port); 
            byte[] byte_port = BitConverter.GetBytes(int_port); 
            _connect_sequence[4] = byte_port[1];
            _connect_sequence[5] = byte_port[0];
        }
private void BuildConnectSequence ( ) { string [ ] str_ip = LocalIp ( ) . Split ( ' ' ) ; byte [ ] byte_ip = new byte [ 4 ] ; for ( int n = 0 ; n < 4 ; n ++ ) { byte_ip [ n ] = Byte . Parse ( str_ip [ n ] ) ; _connect_sequence [ n ] = byte_ip [ n ] ; } int int_port = Int32 . Parse ( _port ) ; byte [ ] byte_port = BitConverter . GetBytes ( int_port ) ; _connect_sequence [ 4 ] = byte_port [ 1 ] ; _connect_sequence [ 5 ] = byte_port [ 0 ] ; }
Build the sequence that must be send to the host to reach.
Build the sequence that must be send to the host to reach .
// str host to byte host // convert each value from str to byte and put it in the connect sequence // str port to byte port // convert str to int // convert int to byte // put it inside connect sequence