public ListMonitor(MonitorServer server, Socket socket) //创建(需传递入相应的变量) { ListenSocket = socket; myServer = server; sRemoteEndPoint = socket.RemoteEndPoint.ToString(); ipaEndIP = ((IPEndPoint)(socket.RemoteEndPoint)).Address; intEndPort = ((IPEndPoint)(socket.RemoteEndPoint)).Port; dtUpateLoadTime = DateTime.Now; strLoginUserName = ""; }
public Form1() { InitializeComponent(); mGuiSysOppt.frmThis = this; m_ClJsonCtrl.frmMain = this; m_MOJsonCtrl.frmMainMo = this; IPAddress ip; string s = "192.168.31.186"; int i = 11574; int n = 11573; if (IPAddress.TryParse(s, out ip) == false) { g_myServer = new Server(ip, i); } mGuiSysOppt.frmThis.g_myServer = new Server(ip, i); C_myServer = new MonitorServer(ip, n); }