|
|
@@ -322,9 +322,8 @@ ErrorCodeEnum CBizChannelEntity::Send(int type, bool compress, bool encrypt, int
|
|
|
{
|
|
|
if (m_eState == eChannelState_Connected) {
|
|
|
//LOG_TRACE("tx pkt, %d bytes, type = %d, compress = %d, encrypt = %d, sub_type = %d, id = %d, hash=%d", data.m_iLength, type, !!compress, !!encrypt, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("tx pkt, %d bytes, type = %d, compress = %d, encrypt = %d, sub_type = %d, id = %d, hash=%d", data.m_iLength, type, !!compress, !!encrypt, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
|
|
|
+ //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("tx pkt, %d bytes, type = %d, compress = %d, encrypt = %d, sub_type = %d, id = %d, hash=%d", data.m_iLength, type, !!compress, !!encrypt, sub_type, id, hash32_buf(data.m_pData, data.m_iLength, 0));
|
|
|
int rc = bizchan_post_pkt(m_pChan, type, compress, encrypt, sub_type, id, (const char*)data.m_pData, data.m_iLength);
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("bizchan_post_pkt result is %d.", rc);
|
|
|
return rc == 0 ? Error_Succeed : Error_NetBroken;
|
|
|
}
|
|
|
else
|
|
|
@@ -441,7 +440,6 @@ void CBizChannelEntity::on_connect(int error, const char *remote_ip, int remote_
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s:%d.", __FUNCTION__, __LINE__);
|
|
|
if (m_pChan) {
|
|
|
bizchan_close(m_pChan);
|
|
|
bizchan_destroy(m_pChan);
|
|
|
@@ -453,7 +451,6 @@ void CBizChannelEntity::on_connect(int error, const char *remote_ip, int remote_
|
|
|
|
|
|
void CBizChannelEntity::on_close()
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s:%d.", __FUNCTION__, __LINE__);
|
|
|
if (m_pChan) {
|
|
|
bizchan_close(m_pChan);
|
|
|
bizchan_destroy(m_pChan);
|
|
|
@@ -498,7 +495,6 @@ void CBizChannelEntity::_on_connect(int error, const char *remote_ip, int remote
|
|
|
|
|
|
void CBizChannelEntity::_on_close()
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s:%d.", __FUNCTION__, __LINE__);
|
|
|
NotifyOnClose *task = new NotifyOnClose();
|
|
|
task->m_pEntity = this;
|
|
|
GetFunction()->PostEntityTaskFIFO(task);
|