2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

Added writable test for Socket when the sending message is in 
progress.
	Usually the sending message is piece message. Without wriable 
check,
	upload latency is dropped to more than 1sec.
	* src/PeerInteractionCommand.cc
pull/1/head
Tatsuhiro Tsujikawa 2008-06-15 16:27:12 +00:00
parent 2f8e184fe5
commit e32eb83c99
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Added writable test for Socket when the sending message is in progress.
Usually the sending message is piece message. Without wriable check,
upload latency is dropped to more than 1sec.
* src/PeerInteractionCommand.cc
2008-06-16 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
Create only requested files and files which shares a piece with

View File

@ -222,6 +222,7 @@ bool PeerInteractionCommand::executeInternal() {
break;
}
case WIRED:
disableWriteCheckSocket();
btInteractive->doInteractionProcessing();
if(btInteractive->countReceivedMessageInIteration() > 0) {
updateKeepAlive();
@ -242,6 +243,9 @@ bool PeerInteractionCommand::executeInternal() {
} else {
disableReadCheckSocket();
}
if(btInteractive->isSendingMessageInProgress()) {
setWriteCheckSocket(socket);
}
break;
}
if(btInteractive->countPendingMessage() > 0) {