public CommandExecutorThread(String ip, int port, Object form) { this.mainformc = form as mainform; socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); IPAddress ipaddress = IPAddress.Parse(ip); IPEndPoint ipendpoint = new IPEndPoint(ipaddress, port); socket.Bind(ipendpoint); socket.Listen(GlobalConstants.MAXLISTENSOCKETS); }
public ReceiveSender(Socket socket, Object form) { this._socket = socket; this.form = form as mainform; }