Re: Coding inside the debugger

From: Robert C. Martin (unclebob_at_objectmentor.com)
Date: 09/10/04


Date: Thu, 09 Sep 2004 18:53:55 -0500

On Thu, 9 Sep 2004 09:17:47 +0100, "paul campbell"
<p.au.lc@objectvision.DOT.co.DOT.uk> wrote:

>I am presuming that FitnessClient needs to do "something" when the packet
>transfers associated with a "session" are complete and hence the reason
>you are trying to avoid its thread becomming blocked on the read where
>no more packets are left to transfer.

Yes.

>
>My approach would be to not worry about avoiding the blocking call e.g.
>
>while(received != sent)
>{
> readBlock();
> processBlock();
>}
>
>by having a dedicate thread for this loop.

The problem with this is that recieved==sent does not mean that the
session is over. Depending on the timing, sent can equal received for
brief periods in the midst of the session.

-----
Robert C. Martin (Uncle Bob) | email: unclebob@objectmentor.com
Object Mentor Inc. | blog: www.butunclebob.com
The Agile Transition Experts | web: www.objectmentor.com
800-338-6716

"The aim of science is not to open the door to infinite wisdom,
 but to set a limit to infinite error."
    -- Bertolt Brecht, Life of Galileo



Relevant Pages

  • Re: IP Spoofing
    ... That would be enough if the purpose of the request was e.g. to delete a database by SQL injection. ... You would not need to keep it in 7 packets, merely to send in a TCP window - pretty large these days, BUT you would also need to cut in on an existing ESTABLISHED session. ... it is quite possible to send packets to the server without anything. ...
    (comp.lang.php)
  • Re: just an idea for packet protocol using ECB
    ... >> packets may be lost. ... the system would never shutdown if attackers kept ... The damage an attacker ... So each file transmission gets a session number. ...
    (sci.crypt)
  • Re: IP Spoofing
    ... That would be enough if the purpose of the request was e.g. to delete a database by SQL injection. ... You would not need to keep it in 7 packets, merely to send in a TCP window - pretty large these days, BUT you would also need to cut in on an existing ESTABLISHED session. ... it is quite possible to send packets to the server without anything. ...
    (comp.lang.php)
  • Re: Remote desktop deadlock on XP SP2
    ... I'm going to move all packet processing out of usermode. ... forward packets from our NDIS IM to usermode via an inverted call ... TermSrv.dll creates a new session for the purpose of displaying the logon ... lives on a DPC routine for the network miniport ...
    (microsoft.public.win32.programmer.kernel)
  • Re: IP Spoofing
    ... That would be enough if the purpose of the request was e.g. to delete a database by SQL injection. ... You would not need to keep it in 7 packets, merely to send in a TCP window - pretty large these days, BUT you would also need to cut in on an existing ESTABLISHED session. ... You need to know all about the TCP session as well as the senders IP address AND current sender port number, or the packet will be discarded as not part of any TCP session the server knows about. ...
    (comp.lang.php)

Loading