private void ProcessLogin() { try { ClientInfo = _enc.DecodeClientInfo(); _enc.Encode(ServerInfo); _enc.Encode("TWS Local Time is to go f**k yourself"); ClientId = _enc.DecodeClientId(); Status = TWSClientStatus.Connected; OnLogin(ClientInfo, ClientId); } catch (Exception e) { Server.OnError(TWSErrors.CONNECT_FAIL); Server.OnError(new TWSError(TWSErrors.NO_VALID_CODE, e.Message)); } }