Skip to content

Commit

Permalink
Updated async client example
Browse files Browse the repository at this point in the history
  • Loading branch information
kala13x committed Nov 26, 2024
1 parent f4754b8 commit 8bb5cce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/async-client.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ int handle_write(xapi_ctx_t *pCtx, xapi_data_t *pData)
int send_complete(xapi_ctx_t *pCtx, xapi_data_t *pData)
{
xlogn("Request sent: fd(%d)", (int)pData->sock.nFD);
XAPI_DisableEvent(pData, XPOLLOUT);

xbyte_buffer_t *pBuffer = XAPI_GetTxBuff(pData);
if (!pBuffer->nUsed) XAPI_DisableEvent(pData, XPOLLOUT);

return XAPI_EnableEvent(pData, XPOLLIN);
}

Expand Down

0 comments on commit 8bb5cce

Please sign in to comment.