|
|
|
@ -26,7 +26,7 @@ |
|
|
|
#include "tr/comm_end_point.h" |
|
|
|
|
|
|
|
int |
|
|
|
cepBufferedRead(TR_CommEndPoint this) |
|
|
|
cepWriteBuffered(TR_CommEndPoint this) |
|
|
|
{ |
|
|
|
TR_RemoteData data = TR_cepNextWriteData(this); |
|
|
|
int send = 0; |
|
|
|
@ -34,11 +34,14 @@ cepBufferedRead(TR_CommEndPoint this) |
|
|
|
while (data) { |
|
|
|
int current_send = TR_socketSend(this->transport, data); |
|
|
|
|
|
|
|
send += current_send; |
|
|
|
// TODO if nothing was send put it back into the queue.. |
|
|
|
// and stop loop. (This was a close.) |
|
|
|
|
|
|
|
data = TR_socketRecv(this->transport); |
|
|
|
data = TR_cepNextWriteData(this); |
|
|
|
} |
|
|
|
|
|
|
|
return TRUE; |
|
|
|
} |
|
|
|
|
|
|
|
// vim: set ts=4 sw=4: |