예제 #1
0
 private void WorkLoop()
 {
     while (sentPackets++ != maxSendPackets)
     {
         int n = ByteOrder.HostToBigEndian(sentPackets);
         int r = session.WriteData(BitConverter.GetBytes(n));
         Console.WriteLine("Send {0}", sentPackets);
     }
 }
예제 #2
0
 public static short NetworkToHostOrder(short network)
 {
     return(ByteOrder.HostToBigEndian(network));
 }
예제 #3
0
 public static short HostToNetworkOrder(short host)
 {
     return(ByteOrder.HostToBigEndian(host));
 }
예제 #4
0
 public static long NetworkToHostOrder(long network)
 {
     return(ByteOrder.HostToBigEndian(network));
 }
예제 #5
0
 public static long HostToNetworkOrder(long host)
 {
     return(ByteOrder.HostToBigEndian(host));
 }