private void Connect(string remoteAddress, int remotePort) { try { MainSocket.BeginConnect(remoteAddress, remotePort, OnConnect, null); } catch (Exception ex) { FireException(ExceptionType.Connect, ex.Message); } }