home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.protocols.tcp-ip      TCP and IP network protocols.      14,669 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 13,904 of 14,669   
   Jorgen Grahn to Rick Jones   
   Re: Linux: stopping TCP i/o in progress    
   07 Nov 12 21:27:10   
   
   From: grahn+nntp@snipabacken.se   
      
   On Wed, 2012-11-07, Rick Jones wrote:   
   > dmarkh11@gmail.com wrote:   
   >> On Tuesday, November 6, 2012 4:18:37 PM UTC-5, Rick Jones wrote:   
   >> > What exactly do you mean by an I/O in progress?   
   >> >   
   >   
   >> For a single send(), I/O in progress would be the time between when   
   >> the Ethernet controller starts putting your data on the wire and   
   >> when it is finished putting your data on the wire. I want, if   
   >> possible, to be able to interrupt that process, within the   
   >> controller, mid flight like I can do with the legacy i/o controller   
   >> I am trying to emulate.   
   >   
   > From the application layer, using sockets, you have no control over   
   > what is happening down at Ethernet.  You have no control over what is   
   > happening at IP and extremely limited control over what is happening   
   > in TCP.  A send() call is not really "synchronous."   
   >   
   > If the socket is marked non-blocking, the send() call completes once   
   > the last byte of the send has been copied into the socket buffer.  The   
   > call does not wait for the data to be sent by Ethernet, or IP, or TCP.   
   >   
   > Once the send() call completes, from that point on, there is no   
   > control (that I can think of) short of closing the socket to keep TCP   
   > from trying to keep sending it.   
      
   The closest I can think of is creating iptables (firewall) rules which   
   silently discards all packets belonging to this TCP connection, in   
   both directions. TCP will continue, but not succeed until the rules   
   are removed.  Probably not a good idea!   
      
   /Jorgen   
      
   --   
     // Jorgen Grahn    O  o   .   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca