Skip to content

Commit

Permalink
Update xkcp_util.c
Browse files Browse the repository at this point in the history
  • Loading branch information
liudf0716 authored Apr 17, 2017
1 parent 0ec993d commit eba6732
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions xkcp_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ void xkcp_tcp_read_cb(struct bufferevent *bev, ikcpcb *kcp)
struct evbuffer *input = bufferevent_get_input(bev);
while ((len = evbuffer_remove(input, buf, sizeof(buf))) > 0) {
nret = ikcp_send(kcp, buf, len);
debug(LOG_INFO, "conv [%d] read data from client [%d] ikcp_send [%d]", kcp->conv, len, nret);
debug(LOG_INFO, "conv [%d] read data from client [%d] len [%d] ikcp_send [%d]",
kcp->conv, bufferevent_getfd(bev), len, nret);
}

}
Expand All @@ -221,7 +222,8 @@ void xkcp_forward_data(struct xkcp_task *task)
break;
}

debug(LOG_INFO, "xkcp_forward_data conv [%d] send [%d]", task->kcp->conv, nrecv);
debug(LOG_INFO, "xkcp_forward_data conv [%d] client[%d] send [%d]",
task->kcp->conv, bufferevent_getfd(task->bev), nrecv);
if (task->bev)
evbuffer_add(bufferevent_get_output(task->bev), obuf, nrecv);
else
Expand Down

0 comments on commit eba6732

Please sign in to comment.