private async Task UnBind() { _log.Info("Unbind SmppClient"); UnBindResp resp = await _client.UnBind(); switch (resp.Header.Status) { case CommandStatus.ESME_ROK: _log.Info("UnBind succeeded: Status: {0}", resp.Header.Status); break; default: _log.Warn("UnBind failed: Status: {0}", resp.Header.Status); await _client.Disconnect(); break; } }
private void UnBind() { UnBind vUnBindBll = new UnBind(); vUnBindBll.Write(_Socket); UnBindResp vResp = (UnBindResp)vUnBindBll.Read(_Socket); if (vResp._Header.CommandId.Equals(SGIPCommandDefine.SGIP_UNBIND_RESP)) { try { if (_Socket != null) { _Socket.Close(); } } catch (IOException e) { throw e; } } }