Esempio n. 1
0
 public TCPRow(UnsafeNativeMethods.TCPRow row)
 {
     state = row.State;
     processId = row.ProcessID;
     var localPort = (row.LocalPort1 << 8) + (row.LocalPort2) + (row.LocalPort3 << 24) + (row.LocalPort4 << 16);
     long localAddress = row.LocalAddress;
     localEndPoint = new IPEndPoint(localAddress, localPort);
     var remotePort = (row.RemotePort1 << 8) + (row.RemotePort2) + (row.RemotePort3 << 24) + (row.RemotePort4 << 16);
     long remoteAddress = row.RemoteAddress;
     remoteEndPoint = new IPEndPoint(remoteAddress, remotePort);
 }