comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Sockets Example Sought
Date: Sat, 24 Nov 2012 22:01:34 +0100
Date: 2012-11-24T22:01:34+01:00	[thread overview]
Message-ID: <17btkxe7c0dse.1dndrk5qjz65x.dlg@40tude.net> (raw)
In-Reply-To: 2012112412270484092-rblove@airmailnet

On Sat, 24 Nov 2012 12:27:04 -0600, Robert Love wrote:

> The statements about disposing of Data, what does Shutdown_Socket it 
> do? It seems to end my task and never reach the following Close_Socket 
> statement.  If I leave it out, I see Close_Socket execute and the 
> program seems to run fine.

Shutdown_Socket does a graceful disconnection before closing the socket. In
particular it flushes/drops pending data. Under Windows it is important to
call it in order to be able to open another socket for the same port.
Otherwise it may take some considerable time after Close_Socket before the
port becomes free. The effect is that you may experience sporadic "port in
use" errors, e.g. when restarting the program.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



  reply	other threads:[~2012-12-01  2:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-23 17:17 Sockets Example Sought Robert Love
2012-11-23 18:32 ` Simon Wright
2012-11-23 21:58   ` Robert Love
2012-11-23 22:40     ` Dmitry A. Kazakov
2012-11-24 18:27       ` Robert Love
2012-11-24 21:01         ` Dmitry A. Kazakov [this message]
2012-11-27  3:37           ` Robert Love
2012-11-27  8:41             ` Dmitry A. Kazakov
2012-11-27 15:05             ` Mark Lorenzen
2012-11-23 23:08     ` Simon Wright
2012-11-28  4:43 ` anon
2012-11-30  5:04   ` Robert Love
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox