public DaemonParameter(bool sendHeartBeat, float heartBeatInterval, bool autoReconnect, int autoReconnectRetryMax, float autoReconnectRetryInterval, ConnectorEventHandler eventHandler)
 {
     this.sendHeartBeat              = sendHeartBeat;
     this.heartBeatInterval          = heartBeatInterval;
     this.autoReconnect              = autoReconnect;
     this.autoReconnectRetryMax      = autoReconnectRetryMax;
     this.autoReconnectRetryInterval = autoReconnectRetryInterval;
     this.eventHandler = eventHandler;
 }
            public void Init(IConnector connector, DaemonParameter initParam)
            {
                this.connector = connector;
                connected      = connector.State == EConnectorState.ExpectConnected;

                sendHeartBeat              = initParam.sendHeartBeat;
                heartBeatInterval          = initParam.heartBeatInterval;
                autoReconnect              = initParam.autoReconnect;
                autoReconnectRetryMax      = initParam.autoReconnectRetryMax;
                autoReconnectRetryInterval = initParam.autoReconnectRetryInterval;
                eventHandler = initParam.eventHandler;
            }
            public void Clear()
            {
                connector = null;
                connected = false;

                sendHeartBeat              = false;
                heartBeatInterval          = 3f;
                lastHeartBeatTime          = 0f;
                lastHeartBeatReturnTime    = 0f;
                autoReconnect              = false;
                autoReconnectRetryMax      = 3;
                autoReconnectRetryCount    = 0;
                autoReconnectRetryInterval = 3f;
                autoReconnectLastRetryTime = 0f;
                reconnect = false;

                eventHandler = null;
            }
 public DaemonParameter(bool sendHeartBeat, bool autoReconnect, ConnectorEventHandler eventHandler)
     : this(sendHeartBeat, 3f, autoReconnect, 3, 3f, eventHandler)
 {
 }