Hello Francois and all,

I'm using a TWSocket client in LineMode with LineEnd set to #13#10.
I connect to a HTTP proxy server using CONNECT command. I then get
a reply back from the HTTP proxy from ReceiveStr()

Things look OK except that I am receiving the data from the first
ReceiveStr() call twice. I get two WSocketDataAvailable messages for
3 lines in the HTTP response:

  Line 1: HTTP/1.0 200 Connection established
  Line 2: Proxy-agent: Proxy+ 3.00
  Line 3: (Blank line)

However, I'm getting the first ReceiveStr() result twice, see below:
I'm getting "HTTP/1.0 200 Connection established" twice:

5/18/2005 2:36:43 PM WSocketDataAvailable idx=0 addr=127.0.0.1:4480 ErrCode=0
5/18/2005 2:36:43 PM HTTP/1.0 200 Connection established
5/18/2005 2:36:43 PM
5/18/2005 2:36:43 PM 
5/18/2005 2:36:43 PM WSocketDataAvailable idx=0 addr=127.0.0.1:4480 ErrCode=0
5/18/2005 2:36:43 PM HTTP/1.0 200 Connection established
Proxy-agent: Proxy+ 3.00


I then changed LineEnd to #13#10#13#10, I still get the result of
the first ReceiveStr() twice, this time the result is two lines:

  HTTP/1.0 200 Connection established
  Proxy-agent: Proxy+ 3.00
  (Blank line)

5/18/2005 2:40:11 PM WSocketDataAvailable idx=0 addr=127.0.0.1:4480 ErrCode=0
5/18/2005 2:40:11 PM HTTP/1.0 200 Connection established
Proxy-agent: Proxy+ 3.00


5/18/2005 2:40:11 PM 
5/18/2005 2:40:11 PM 
5/18/2005 2:40:11 PM WSocketDataAvailable idx=0 addr=127.0.0.1:4480 ErrCode=0
5/18/2005 2:40:11 PM HTTP/1.0 200 Connection established
Proxy-agent: Proxy+ 3.00


It seems that, somehow the first ReceiveStr() didn't remove the data
from the buffer. Or am I missing anything?


-- 
Best regards,
Jack


-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to