ndt-dev - [ndt-dev] [ndt] r1095 committed - Do not wait for bodies from proto messages with 0 length...
Subject: NDT-DEV email list created
List archive
[ndt-dev] [ndt] r1095 committed - Do not wait for bodies from proto messages with 0 length...
Chronological Thread
- From:
- To:
- Subject: [ndt-dev] [ndt] r1095 committed - Do not wait for bodies from proto messages with 0 length...
- Date: Fri, 20 Jun 2014 01:17:29 +0000
Revision: 1095
Author:
Date: Fri Jun 20 01:17:17 2014 UTC
Log: Do not wait for bodies from proto messages with 0 length
This is especially true for "start test" messages that,
under non-extended login conditions, have 0 length.
http://code.google.com/p/ndt/source/detail?r=1095
Modified:
/branches/Issue150/flash-client/src/TestC2S.as
/branches/Issue150/flash-client/src/TestMETA.as
/branches/Issue150/flash-client/src/TestS2C.as
=======================================
--- /branches/Issue150/flash-client/src/TestC2S.as Wed Jun 18 07:06:05 2014 UTC
+++ /branches/Issue150/flash-client/src/TestC2S.as Fri Jun 20 01:17:17 2014 UTC
@@ -280,12 +280,16 @@
if (!_msg.readHeader(_ctlSocket))
return;
_testStage = START_TEST2;
- if (_ctlSocket.bytesAvailable > 0)
+ if ( (!_msg.length) || (_ctlSocket.bytesAvailable > 0) ) {
// In case header and body have arrive together at the client, they
// trigger a single ProgressEvent.SOCKET_DATA event. In such case,
// it's necessary to explicitly call the following function to move to
// the next step.
+
+ // This case also handles non-extended login TEST_START messages
+ // that have a 0-length body.
startTest2();
+ }
}
private function startTest2():void {
=======================================
--- /branches/Issue150/flash-client/src/TestMETA.as Wed Jun 18 07:06:05 2014 UTC
+++ /branches/Issue150/flash-client/src/TestMETA.as Fri Jun 20 01:17:17 2014 UTC
@@ -150,12 +150,16 @@
if (!_msg.readHeader(_ctlSocket))
return;
_testStage = START_TEST2;
- if (_ctlSocket.bytesAvailable > 0)
+ if ( (!_msg.length) || (_ctlSocket.bytesAvailable > 0) ) {
// In case header and body have arrive together at the client, they
// trigger a single ProgressEvent.SOCKET_DATA event. In such case,
// it's necessary to explicitly call the following function to move to
// the next step.
+
+ // This case also handles non-extended login TEST_START messages
+ // that have a 0-length body.
startTest2();
+ }
}
private function startTest2():void {
=======================================
--- /branches/Issue150/flash-client/src/TestS2C.as Wed Jun 18 07:06:05 2014 UTC
+++ /branches/Issue150/flash-client/src/TestS2C.as Fri Jun 20 01:17:17 2014 UTC
@@ -256,12 +256,16 @@
if (!_msg.readHeader(_ctlSocket))
return;
_testStage = START_TEST2;
- if (_ctlSocket.bytesAvailable > 0)
+ if ( (!_msg.length) || (_ctlSocket.bytesAvailable > 0) ) {
// In case header and body have arrive together at the client, they
// trigger a single ProgressEvent.SOCKET_DATA event. In such case,
// it's necessary to explicitly call the following function to move to
// the next step.
+
+ // This case also handles non-extended login TEST_START messages
+ // that have a 0-length body.
startTest2();
+ }
}
private function startTest2():void {
- [ndt-dev] [ndt] r1095 committed - Do not wait for bodies from proto messages with 0 length..., ndt, 06/20/2014
Archive powered by MHonArc 2.6.16.