tr_peerIo *io = (tr_peerIo *)closure;
assert( tr_isPeerIo( io ) );
- tr_ndbg( "UTP", "On read: %ld", (long)buflen );
-
rc = evbuffer_add( io->inbuf, buf, buflen );
if( rc < 0 ) {
tr_nerr( "UTP", "On read evbuffer_add" );
{
tr_peerIo *io = (tr_peerIo *)closure;
int rc;
-
assert( tr_isPeerIo( io ) );
- tr_ndbg( "UTP", "On write: %ld", (long)buflen );
rc = evbuffer_remove( io->outbuf, buf, buflen );
if( rc < (long)buflen ) {
else
bytes = 0;
- tr_ndbg( "UTP", "Get RB size %ld", (long)bytes);
-
return UTP_READ_BUFFER_SIZE - bytes;
}
tr_peerIo *io = (tr_peerIo *)closure;
assert( tr_isPeerIo( io ) );
- tr_ndbg( "UTP", "On state change: %d", state );
-
if( state == UTP_STATE_CONNECT || state == UTP_STATE_WRITABLE ) {
size_t count = evbuffer_get_length( io->outbuf );
if( count > 0 )
tr_peerIo *io = (tr_peerIo *)closure;
assert( tr_isPeerIo( io ) );
- tr_ndbg( "UTP", "Error callback: %s", tr_strerror( errcode ) );
-
if( io->gotError ) {
errno = errcode;
io->gotError( io, BEV_EVENT_ERROR, io->userData );
tr_peerIo *io = (tr_peerIo *)closure;
assert( tr_isPeerIo( io ) );
- tr_ndbg( "UTP", "On overhead: %d %ld %d", (int)send, (long)count, type );
tr_bandwidthUsed( &io->bandwidth, send ? TR_UP : TR_DOWN,
count, FALSE, tr_time_msec() );
}