Beispiel #1
0
        public bool reconnect_server(String tcp_ip, short tcp_port, String udp_ip, short udp_port)
        {
            try
            {
                tcp_ch.disconnect();
                udp_ch.disconnect();

                log.log.operation(new System.Diagnostics.StackFrame(), service.timerservice.Tick, "uuid:{0}", uuid);
                uuid = System.Guid.NewGuid().ToString();
                log.log.operation(new System.Diagnostics.StackFrame(), service.timerservice.Tick, "uuid:{0}", uuid);
                is_reconnect = true;

                tcp_ch            = _conn.connect(tcp_ip, tcp_port);
                _client_call_gate = new caller.client_call_gate(tcp_ch);
                _client_call_gate.connect_server(uuid, service.timerservice.Tick);

                _udp_ip   = udp_ip;
                _udp_port = udp_port;
            }
            catch (Exception)
            {
                return(false);
            }

            return(true);
        }
Beispiel #2
0
        public bool connect_server(String ip, short port, Int64 tick)
        {
            try
            {
                var ch = _conn.connect(ip, port);
                _client_call_gate = new caller.client_call_gate(ch);
                _client_call_gate.connect_server(uuid, tick);
            }
            catch (Exception)
            {
                return(false);
            }

            return(true);
        }
Beispiel #3
0
        public bool connect_server(String ip, short port)
        {
            try
            {
                var ch = _conn.connect(ip, port);
                _client_call_gate = new caller.client_call_gate(ch);
                _client_call_gate.connect_server(uuid);
            }
            catch (Exception)
            {
                return false;
            }

            return true;
        }
Beispiel #4
0
        public bool connect_server(String tcp_ip, short tcp_port)
        {
            try
            {
                is_reconnect = false;

                tcp_ch            = _conn.connect(tcp_ip, tcp_port);
                _client_call_gate = new caller.client_call_gate(tcp_ch);
                _client_call_gate.connect_server(uuid, service.timerservice.Tick);
            }
            catch (Exception)
            {
                return(false);
            }

            return(true);
        }
Beispiel #5
0
        public bool connect_server(String tcp_ip, short tcp_port, String udp_ip, short udp_port, Int64 tick)
        {
            try
            {
                var ch = _conn.connect(tcp_ip, tcp_port);
                _client_call_gate = new caller.client_call_gate(ch);
                _client_call_gate.connect_server(uuid, tick);

                _udp_ip   = udp_ip;
                _udp_port = udp_port;
            }
            catch (Exception)
            {
                return(false);
            }

            return(true);
        }
Beispiel #6
0
        public bool reconnect_server(String tcp_ip, short tcp_port, String udp_ip, short udp_port, Int64 tick)
        {
            try
            {
                uuid = System.Guid.NewGuid().ToString();

                is_reconnect = true;

                var ch = _conn.connect(tcp_ip, tcp_port);
                _client_call_gate = new caller.client_call_gate(ch);
                _client_call_gate.connect_server(uuid, tick);

                _udp_ip   = udp_ip;
                _udp_port = udp_port;
            }
            catch (Exception)
            {
                return(false);
            }

            return(true);
        }