comp.lang.ada
 help / color / mirror / Atom feed
From: "Andrew Carroll" <andrew@carroll-tech.net>
To: <comp.lang.ada@ada-france.org>
Subject: copy constructor for sockets
Date: Sat, 22 May 2004 15:18:36 -0600
Date: 2004-05-22T15:18:36-06:00	[thread overview]
Message-ID: <mailman.9.1085259629.401.comp.lang.ada@ada-france.org> (raw)

Okay,

I have written a small test server.  All it does is Accept() connections
and Get_line() and then a final Get().  It is just an experiment but I
want the server now to create a task (with a socket as one of it's
members) and initialize that socket.  There are two types of tasks
however and the distinction between which task to create comes from the
header information in the get_line() right after the Accept().  If it is
a GET header then I would create task type A, if it is a POST then I
would create task type B.

So, the server must accept the socket and do an initial read to get the
header information (GET or POST) to know which type of task to create.
Then I want to initialize the socket that is in the task type to be the
same as the socket in the server that was just accepted.  It would
probably need to be a "deep copy" of the socket because the server will
need to release the socket and the task will need to keep the socket.
By release I mean close() and by keep I mean use for communication.

The other option is to use an access yet I think it could be done
without it.

Doesn't the ":=" operator to a "deep copy"?

Andrew





             reply	other threads:[~2004-05-22 21:18 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-22 21:18 Andrew Carroll [this message]
2004-05-22 21:46 ` copy constructor for sockets tmoran
2004-05-23 11:21   ` Simon Wright
2004-05-24 18:26     ` tmoran
2004-05-25  5:10       ` Simon Wright
2004-05-25  6:37         ` tmoran
2004-05-23  9:43 ` Mark Lorenzen
2004-05-23 11:27 ` Simon Wright
  -- strict thread matches above, loose matches on Subject: below --
2004-05-24 11:28 Andrew Carroll
2004-05-25  5:29 ` Simon Wright
2004-05-22 10:19 Andrew Carroll
2004-05-22 11:55 ` Simon Wright
2004-05-22 18:39   ` tmoran
2004-05-23 21:04   ` Matthew Heaney
2004-05-24  7:13     ` Marius Amado Alves
2004-05-24  3:23       ` Matthew Heaney
2004-05-24  4:53         ` Simon Wright
2004-05-24  5:20           ` tmoran
2004-05-25  4:53             ` Simon Wright
2004-05-24 12:36           ` Matthew Heaney
2004-05-25 21:50           ` Robert I. Eachus
replies disabled

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