Exemplo n.º 1
0
        private void AsyncWriteRequestStream(IAsyncResult ar)
        {
            // 取出回调前的状态参数
            MyCallbackParam       cp = (MyCallbackParam)ar.AsyncState;
            RequestMessageWrapper sendMessageWrapper = cp.State;

            byte[] requestData = sendMessageWrapper.MessageBody.ToByteArray();

            try
            {
                // 结束写入数据的操作
                using (Stream bw = cp.Request.EndGetRequestStream(ar))
                {
                    bw.Write(requestData, 0, requestData.Length);
                }

                // 开始异步向服务器发起请求
                cp.Request.BeginGetResponse(GetResponseCallback, cp);
            }
            catch (Exception e)
            {
                //Debug.LogError(string.Format("rsping msg id :{0} - {1}", sendMessageWrapper.MessageId, e.ToString()));

                this.m_context.Post(WorkQueueCallback, new SendMessageCallback()
                {
                    MessageId = sendMessageWrapper.MessageId,
                    Status    = NetworkModule.NetworkStatus.LOG_ERROR
                });
            }
        }
Exemplo n.º 2
0
        private void OnRsp(RequestMessageWrapper sendMessageWrapper, HTTPResponse response)
        {
            if (response.GetFirstHeaderValue("msgId") == null)
            {
                Debug.Log("BEST HTTP :error message no message id on response header");
                return;
            }
            else
            {
                int messageId = int.Parse(response.GetFirstHeaderValue("msgId"));
                if (messageId == 400)
                {
                    GOEngine.DebugUtil.Log($"BEST HTTP :server error == 400  ,server ip:{this.m_serverIp}");
                }

                byte[] buffer = response.Data;

                if (!string.IsNullOrEmpty(response.GetFirstHeaderValue("errorCode")))
                {
                    int    errorCode    = int.Parse(response.GetFirstHeaderValue("errorCode"));
                    string errorContent = Encoding.UTF8.GetString(buffer);

                    EngineCoreEvents.SystemEvents.NetWorkError.SafeInvoke(errorCode, errorContent);
                }
                else
                {
                    IMessage message = EngineCore.MessageParser.Parse(messageId, buffer);

                    this.m_messageQueue.Enqueue(new ResponseMessageWrapper(messageId, message));


                    HttpPairCahce.EnCache(sendMessageWrapper.MessageBody);
                }
            }
        }
Exemplo n.º 3
0
        private void T_RawSendInternal(object state, bool retry)
        {
            RequestMessageWrapper sendMessageWrapper = state as RequestMessageWrapper;

            if (!retry && sendMessageWrapper.RequestType == RequestMessageType.SYNC)
            {
                Debug.Log(string.Format("{0} retry count left {1}", sendMessageWrapper.MessageBody.Descriptor.Name, sendMessageWrapper.m_retry_count));
            }
            string serverTarget = MessageTargetDefine.GetServerUrl(sendMessageWrapper.MessageBody);

            if (string.IsNullOrEmpty(serverTarget))
            {
                return;
            }

            Uri            serverUri = new Uri(this.m_serverIp + "/" + serverTarget);
            HttpWebRequest request   = null;

            if (serverUri.Scheme == "https")
            {
                ServicePointManager.ServerCertificateValidationCallback = (a, b, c, d) => { return(true); };
                ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;//配置协议 4.6 好像默认不设SecurityProtocolType.Ssl3
                request = WebRequest.Create(serverUri) as HttpWebRequest;
                request.ProtocolVersion = HttpVersion.Version10;
            }
            else
            {
                request = WebRequest.Create(serverUri) as HttpWebRequest;
            }

            request.Timeout = 15000;
            //request.ReadWriteTimeout = 10000;
            request.ContentType = "application/x-protobuf";
            request.Accept      = "application/x-protobuf";
            request.Method      = "POST";
            //ForceIpv6(request);

            string accountToken = EngineCoreEvents.SystemEvents.FetchUserIdentification();

            if (!string.IsNullOrEmpty(accountToken))
            {
                request.Headers["accessToken"] = accountToken;
            }

            //byte[] requestData = sendMessageWrapper.MessageBody.ToByteArray();
            if (sendMessageWrapper.RequestType == RequestMessageType.SYNC)
            {
                T_DoSyncSend(sendMessageWrapper, request, retry);
            }
            else
            {
                sendMessageWrapper.m_unique_identifier = (++m_atomic_sending_counter).ToString();
                m_sending_times.Add(sendMessageWrapper.m_unique_identifier, CommonUtils.GetCurTimeMillSenconds());

                T_DoASyncSend(sendMessageWrapper, request);
            }
        }
Exemplo n.º 4
0
        /// <summary>
        /// 同步无重发,有断网提示
        /// </summary>
        /// <param name="sendMessageWrapper"></param>
        private void DoHalfSyncSend(RequestMessageWrapper sendMessageWrapper)
        {
            WorkQueueCallback(new SendMessageCallback()
            {
                MessageId = sendMessageWrapper.MessageId,
                Status    = NetworkModule.NetworkStatus.WAITING_SYNC
            });

            CreateHttpRequest(sendMessageWrapper, OnHalfSyncRequestFinished);
        }
Exemplo n.º 5
0
        private void T_DoASyncSend(RequestMessageWrapper sendMessageWrapper, HttpWebRequest request)
        {
            MyCallbackParam cp = new MyCallbackParam()
            {
                State   = sendMessageWrapper,
                Request = request,
            };

            request.BeginGetRequestStream(AsyncWriteRequestStream, cp);
        }
Exemplo n.º 6
0
        //public void RetryMessage(RequestMessageWrapper message)
        //{

        //    if (!m_is_retry_ui_show)
        //    {
        //        //弹出倒计时界面
        //        EngineCoreEvents.SystemEvents.OnSendingSyncMsgCallback.SafeInvoke(0, NetworkModule.NetworkStatus.SYNC_SUCCEED);
        //        EngineCoreEvents.SystemEvents.OnRetryingSyncMsg.SafeInvoke(0, NetworkModule.NetworkStatus.WAITTING_RETRY);
        //        m_is_retry_ui_show = true;
        //    }


        //    ThreadPool.QueueUserWorkItem(T_RetryRawSend, message);

        //    //if (!m_retry_wrapper.CheckTime())
        //    //{
        //    //    if (m_retry_wrapper.IsPendingMsg())
        //    //    {
        //    //        //弹出确认提示
        //    //        EngineCoreEvents.SystemEvents.OnRetryingSyncMsg.SafeInvoke(0, NetworkModule.NetworkStatus.RESET_RETRY_TIME);
        //    //    }
        //    //    else
        //    //    {
        //    //        FinishRetryMessage();
        //    //    }
        //    //}

        //}

        public void RetryMessage()
        {
            if (m_is_retrying)
            {
                return;
            }

            SuspendRetryMessage();


            Debug.Log("update重试发送来了");

            if (m_retry_wrapper.IsPendingMsg())
            {
                if (!m_is_retry_ui_show)
                {
                    //弹出倒计时界面
                    EngineCoreEvents.SystemEvents.OnSendingSyncMsgCallback.SafeInvoke(0, NetworkModule.NetworkStatus.SYNC_SUCCEED);
                    EngineCoreEvents.SystemEvents.OnRetryingSyncMsg.SafeInvoke(0, NetworkModule.NetworkStatus.WAITTING_RETRY);

                    m_is_retry_ui_show = true;
                }
            }


            if (m_retry_wrapper.CheckTime())
            {
                RequestMessageWrapper retry_req = m_retry_wrapper.Dequeue();


                if (null != retry_req)
                {
                    ThreadPool.QueueUserWorkItem(T_RetryRawSend, retry_req);
                    //ThreadPool.QueueUserWorkItem(T_RawSend, retry_req);
                }
                else
                {
                    FinishRetryMessage();
                }
            }
            else
            {
                if (m_retry_wrapper.IsPendingMsg())
                {
                    //弹出确认提示
                    EngineCoreEvents.SystemEvents.OnRetryingSyncMsg.SafeInvoke(0, NetworkModule.NetworkStatus.RESET_RETRY_TIME);
                }
                else
                {
                    FinishRetryMessage();
                }
            }
        }
Exemplo n.º 7
0
        private void BornErrorLog(RequestMessageWrapper sendMessageWrapper)
        {
            //this.m_context.Post(WorkQueueCallback, new SendMessageCallback()
            //{
            //    MessageId = sendMessageWrapper.MessageId,
            //    Status = NetworkModule.NetworkStatus.LOG_ERROR
            //});

            WorkQueueCallback(new SendMessageCallback()
            {
                MessageId = sendMessageWrapper.MessageId,
                Status    = NetworkModule.NetworkStatus.LOG_ERROR
            });
        }
Exemplo n.º 8
0
        private void BornRetry(RequestMessageWrapper sendMessageWrapper)
        {
            TimeModule.Instance.SetTimeout(() =>
            {
                //Debug.Log("入列!!!");
                this.m_retry_wrapper.Enqueue(sendMessageWrapper);

                WorkQueueCallback(new SendMessageCallback()
                {
                    MessageId = sendMessageWrapper.MessageId,
                    Status    = NetworkModule.NetworkStatus.RETRY_ONE_FINISHED
                });
            }, UnityEngine.Random.Range(3.0f, 5.0f)
                                           );
        }
Exemplo n.º 9
0
        private void BornRetry(RequestMessageWrapper sendMessageWrapper)
        {
            Debug.Log("产生重新发送!!!睡眠");
            Debug.Log(HttpRetry.GetCurrentTimeSecond());
            Thread.Sleep(3000);
            Debug.Log("产生重新发送!!!睡眠结束");
            Debug.Log(HttpRetry.GetCurrentTimeSecond());

            Debug.Log("入列!!!");
            this.m_retry_wrapper.Enqueue(sendMessageWrapper);

            this.m_context.Post(WorkQueueCallback, new SendMessageCallback()
            {
                MessageId = sendMessageWrapper.MessageId,
                Status    = NetworkModule.NetworkStatus.RETRY_ONE_FINISHED
            });
        }
Exemplo n.º 10
0
        private void CreateHttpRequest(RequestMessageWrapper sendMessageWrapper, OnRequestFinishedDelegate OnFinished_)
        {
            string serverTarget = MessageTargetDefine.GetServerUrl(sendMessageWrapper.MessageBody);

            if (string.IsNullOrEmpty(serverTarget))
            {
                return;
            }

            Uri serverUri = new Uri(EngineCoreEvents.BridgeEvent.GetServerAddress.SafeInvoke() + "/" + serverTarget);

            //<best
            BestHTTP.HTTPRequest request = new HTTPRequest(serverUri, HTTPMethods.Post, OnFinished_);
            request.IsKeepAlive = true;
            request.RawData     = sendMessageWrapper.MessageBody.ToByteArray();;
            request.SetHeader("Content-Type", "application/x-protobuf");
            request.SetHeader("Accept", "application/x-protobuf");
            string accountToken = EngineCoreEvents.SystemEvents.FetchUserIdentification();

            if (!string.IsNullOrEmpty(accountToken))
            {
                request.SetHeader("accessToken", accountToken);
            }

            int send_identifier = ++S_ATOMIC_COUNTER;

            request.SetHeader("sendTime", send_identifier.ToString());

#if UNITY_DEBUG
            DateTime t1    = DateTime.Now;
            TimeSpan t22   = new TimeSpan(t1.Ticks);
            long     time2 = Convert.ToInt64(t22.TotalMilliseconds);

            //Debug.LogWarning($"SENDING TIME :{request.Uri}  {t1.ToString("yyyy/MM/dd HH:mm:ss:fffffff")}");
            sendMessageWrapper.Send_time      = time2;
            sendMessageWrapper.Send_timestamp = t1.ToString("yyyy/MM/dd HH:mm:ss:fffffff");
#else
            sendMessageWrapper.Send_time = CommonUtils.GetCurTimeMillSenconds();
#endif
            HttpSendingCahce.AddToSendingCache(send_identifier.ToString(), sendMessageWrapper);

            request.Send();
        }
Exemplo n.º 11
0
        private void RawSendInternal(object state, bool retry)
        {
            RequestMessageWrapper sendMessageWrapper = state as RequestMessageWrapper;

            sendMessageWrapper.Is_retry = retry;

            if (sendMessageWrapper.RequestType == RequestMessageType.SYNC)
            {
                DoSyncSend(sendMessageWrapper, retry);
            }
            else if (sendMessageWrapper.RequestType == RequestMessageType.HALF_SYNC)
            {
                DoHalfSyncSend(sendMessageWrapper);
            }
            else
            {
                DoASyncSend(sendMessageWrapper);
            }
            //>
        }
Exemplo n.º 12
0
        private void OnASyncRequestFinished(HTTPRequest originalRequest, HTTPResponse response)
        {
            RequestMessageWrapper sendMessageWrapper = HttpSendingCahce.GetAndRemoveFromSendingCache(originalRequest);

            if (null == sendMessageWrapper)
            {
                Debug.LogError($"BEST HTTP : return unknown rsp {response.GetFirstHeaderValue("msgId")}");
                return;
            }
            switch (originalRequest.State)
            {
            case HTTPRequestStates.Finished:
                //Debug.Log("Request Finished Successfully!\n" + response.DataAsText);
                OnRsp(sendMessageWrapper, response);
                break;

            case HTTPRequestStates.Error:
                Debug.LogError("BEST HTTP :Request Finished with Error! " + (originalRequest.Exception != null ? (originalRequest.Exception.Message + "\n" + originalRequest.Exception.StackTrace) : "No Exception"));
                BornErrorLog(sendMessageWrapper);
                break;

            case HTTPRequestStates.Aborted:
                Debug.LogWarning("BEST HTTP :Request Aborted!");
                BornErrorLog(sendMessageWrapper);
                break;

            case HTTPRequestStates.ConnectionTimedOut:
                Debug.LogError("BEST HTTP :Connection Timed Out!");
                BornErrorLog(sendMessageWrapper);
                break;

            case HTTPRequestStates.TimedOut:
                Debug.LogError("BEST HTTP :Processing the request Timed Out!");
                BornErrorLog(sendMessageWrapper);
                break;
            }
        }
Exemplo n.º 13
0
        private void SendMessageInternal(RequestMessageWrapper message)
        {
            if (this.m_networkStatus == NetworkStatus.TIMEOUT)
            {
                this.m_httpClient = null;
            }
            else if (this.m_networkStatus == NetworkStatus.WAITING_SYNC)
            {
                Debug.Log("waiting sync response");
                return;
            }
            else
            {
                if (string.IsNullOrEmpty(EngineCoreEvents.BridgeEvent.GetServerAddress()))
                {
                    Debug.LogError("no server ip");
                }
                else
                {
                    if (this.m_httpClient == null)
#if BEST_HTTP
                    { this.m_httpClient = new BestHttpClient(EngineCoreEvents.BridgeEvent.GetServerAddress()); }
#else
                    { this.m_httpClient = new HttpClient(EngineCoreEvents.BridgeEvent.GetServerAddress()); }
#endif

#if UNITY_DEBUG
                    if (1901 != message.MessageId)
                    {
                        Debug.Log($"send message :{message.MessageBody.Descriptor.Name}");
                    }
#endif

                    this.m_httpClient.SendMessage(message);
                }
            }
        }
Exemplo n.º 14
0
 public void SendMessage(RequestMessageWrapper message)
 {
     ThreadPool.QueueUserWorkItem(T_RawSend, message);
 }
Exemplo n.º 15
0
 /// <summary>
 /// 异步无提示
 /// </summary>
 /// <param name="sendMessageWrapper"></param>
 private void DoASyncSend(RequestMessageWrapper sendMessageWrapper)
 {
     CreateHttpRequest(sendMessageWrapper, OnASyncRequestFinished);
 }
Exemplo n.º 16
0
 public static void AddToSendingCache(string send_identifier, RequestMessageWrapper req_)
 {
     S_SENDING_REQS.Add(send_identifier, req_);
 }
Exemplo n.º 17
0
        private void GetResponseCallback(IAsyncResult ar)
        {
            // 取出回调前的状态参数
            MyCallbackParam       cp = (MyCallbackParam)ar.AsyncState;
            RequestMessageWrapper sendMessageWrapper = cp.State as RequestMessageWrapper;

            long start_time = m_sending_times[sendMessageWrapper.m_unique_identifier];

            m_sending_times.Remove(sendMessageWrapper.m_unique_identifier);

            try
            {
                // 读取服务器的响应
                using (HttpWebResponse response = (HttpWebResponse)cp.Request.EndGetResponse(ar))
                {
                    using (Stream responseStream = response.GetResponseStream())
                    {
                        int responseBufferLength = (int)response.ContentLength;

                        if (response.Headers["msgId"] == null)
                        {
                            Debug.Log("error message no message id on response header");
                            return;
                        }
                        else
                        {
                            int messageId = int.Parse(response.Headers["msgId"]);
                            if (messageId == 400)
                            {
                                GOEngine.DebugUtil.Log($"server error == 400  ,server ip:{this.m_serverIp}");
                            }

                            else if (messageId == 1)
                            {
                                GOEngine.DebugUtil.Log($"server error == 1  ,remote login");
                            }

                            byte[] buffer = new byte[responseBufferLength];
                            responseStream.Read(buffer, 0, responseBufferLength);

                            if (!string.IsNullOrEmpty(response.Headers["errorCode"]))
                            {
                                int    errorCode    = int.Parse(response.Headers["errorCode"]);
                                string errorContent = Encoding.UTF8.GetString(buffer);

                                EngineCoreEvents.SystemEvents.NetWorkError.SafeInvoke(errorCode, errorContent);
                            }
                            else
                            {
                                long delta_time = CommonUtils.GetCurTimeMillSenconds() - start_time;

                                Debug.LogWarning($"C# HTTP ASYNC : cur msg {sendMessageWrapper.MessageId} total cost {delta_time} ms");

                                IMessage message = EngineCore.MessageParser.Parse(messageId, buffer);

                                this.m_messageQueue.Enqueue(new ResponseMessageWrapper(messageId, message));
                            }
                        }
                    }
                }
            }
            catch (Exception e)
            {
                //Debug.LogError(string.Format("rsping msg id :{0} - {1}", sendMessageWrapper.MessageId, e.ToString()));

                this.m_context.Post(WorkQueueCallback, new SendMessageCallback()
                {
                    MessageId = sendMessageWrapper.MessageId,
                    Status    = NetworkModule.NetworkStatus.LOG_ERROR
                });
            }
        }
Exemplo n.º 18
0
        private void OnHalfSyncRequestFinished(HTTPRequest originalRequest, HTTPResponse response)
        {
            RequestMessageWrapper sendMessageWrapper = HttpSendingCahce.GetAndRemoveFromSendingCache(originalRequest);

            if (null == sendMessageWrapper)
            {
                Debug.LogError($"BEST HTTP : return unknown rsp {response.GetFirstHeaderValue("msgId")}");
                return;
            }
            switch (originalRequest.State)
            {
            case HTTPRequestStates.Finished:
                //Debug.Log("Request Finished Successfully!\n" + response.DataAsText);
                OnRsp(sendMessageWrapper, response);

                WorkQueueCallback(new SendMessageCallback()
                {
                    MessageId = sendMessageWrapper.MessageId,
                    Status    = NetworkModule.NetworkStatus.SYNC_SUCCEED
                });
                break;

            case HTTPRequestStates.Error:
            {
                Debug.LogError("Request Finished with Error! " + (originalRequest.Exception != null ? (originalRequest.Exception.Message + "\n" + originalRequest.Exception.StackTrace) : "No Exception"));
                WorkQueueCallback(new SendMessageCallback()
                    {
                        MessageId = sendMessageWrapper.MessageId,
                        Status    = NetworkModule.NetworkStatus.OFFLINE_WARNNING
                    });
            }
            break;

            case HTTPRequestStates.Aborted:
                Debug.LogWarning("BEST HTTP :Request Aborted!");
                WorkQueueCallback(new SendMessageCallback()
                {
                    MessageId = sendMessageWrapper.MessageId,
                    Status    = NetworkModule.NetworkStatus.OFFLINE_WARNNING
                });
                break;

            case HTTPRequestStates.ConnectionTimedOut:
                Debug.LogError("BEST HTTP :Connection Timed Out!");
                WorkQueueCallback(new SendMessageCallback()
                {
                    MessageId = sendMessageWrapper.MessageId,
                    Status    = NetworkModule.NetworkStatus.OFFLINE_WARNNING
                });
                break;

            case HTTPRequestStates.TimedOut:
                Debug.LogError("BEST HTTP :Processing the request Timed Out!");
                WorkQueueCallback(new SendMessageCallback()
                {
                    MessageId = sendMessageWrapper.MessageId,
                    Status    = NetworkModule.NetworkStatus.OFFLINE_WARNNING
                });
                break;

            default:
                break;
            }
        }
Exemplo n.º 19
0
 public void Enqueue(RequestMessageWrapper req_)
 {
     this.m_retry_req_queue.Enqueue(req_);
 }
Exemplo n.º 20
0
        //private void LogIpType(IP_TYPE_ENUM type_)
        //{
        //    Dictionary<UBSParamKeyName, object> _param = new Dictionary<UBSParamKeyName, object>();
        //    _param.Add(UBSParamKeyName.Description, IP_TYPE_ENUM.E_IPV6 == type_ ? 6 : 4);
        //    UserBehaviorStatisticsModules.Instance.LogEvent(UBSEventKeyName.ip_type, null, _param);
        //}

        private void T_DoSyncSend(RequestMessageWrapper sendMessageWrapper, HttpWebRequest request, bool retry)
        {
            if (!retry)
            {
                this.m_context.Post(WorkQueueCallback, new SendMessageCallback()
                {
                    MessageId = sendMessageWrapper.MessageId,
                    Status    = NetworkModule.NetworkStatus.WAITING_SYNC
                });
            }



            byte[] requestData = sendMessageWrapper.MessageBody.ToByteArray();
            long   send_time;
            long   delta_time;

            try
            {
                send_time = CommonUtils.GetCurTimeMillSenconds();

                using (Stream stream = request.GetRequestStream())
                {
                    request.GetRequestStream().Write(requestData, 0, requestData.Length);
                }
            }
            catch (Exception e)
            {
                Debug.LogError(string.Format("reqing msg id :{0} - {1}", sendMessageWrapper.MessageId, e.ToString()));
                BornRetry(sendMessageWrapper);

                return;
            }

            try
            {
                HttpWebResponse response = (HttpWebResponse)request.GetResponse();

                if (!retry)
                {
                    this.m_context.Post(WorkQueueCallback, new SendMessageCallback()
                    {
                        MessageId = sendMessageWrapper.MessageId,
                        Status    = NetworkModule.NetworkStatus.SYNC_SUCCEED
                    });
                }
                else
                {
                    this.m_context.Post(WorkQueueCallback, new SendMessageCallback()
                    {
                        MessageId = sendMessageWrapper.MessageId,
                        Status    = NetworkModule.NetworkStatus.RETRY_ONE_FINISHED
                    });
                }
                using (Stream responseStream = response.GetResponseStream())
                {
                    int responseBufferLength = (int)response.ContentLength;

                    if (response.Headers["msgId"] == null)
                    {
                        Debug.Log("error message no message id on response header");
                        return;
                    }
                    else
                    {
                        int messageId = int.Parse(response.Headers["msgId"]);
                        if (messageId == 400)
                        {
                            GOEngine.DebugUtil.Log($"server error == 400  ,server ip:{this.m_serverIp}");
                        }

                        byte[] buffer = new byte[responseBufferLength];
                        responseStream.Read(buffer, 0, responseBufferLength);

                        delta_time = CommonUtils.GetCurTimeMillSenconds() - send_time;

                        if (delta_time > 500)
                        {
                            Debug.LogWarning($"C# HTTP SYNC : cur msg {request.RequestUri.ToString()} total cost {delta_time} ms");
                        }

                        if (!string.IsNullOrEmpty(response.Headers["errorCode"]))
                        {
                            int    errorCode    = int.Parse(response.Headers["errorCode"]);
                            string errorContent = Encoding.UTF8.GetString(buffer);

                            EngineCoreEvents.SystemEvents.NetWorkError.SafeInvoke(errorCode, errorContent);
                        }
                        else
                        {
                            IMessage message = EngineCore.MessageParser.Parse(messageId, buffer);

                            this.m_messageQueue.Enqueue(new ResponseMessageWrapper(messageId, message));
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Debug.LogError(string.Format("rsping msg id :{0} - {1}", sendMessageWrapper.MessageId, e.ToString()));

                BornRetry(sendMessageWrapper);
                return;
            }
        }
Exemplo n.º 21
0
 public void SendMessage(RequestMessageWrapper message)
 {
     RawSend(message);
 }