comp.lang.ada
 help / color / mirror / Atom feed
From: tmoran@acm.org
Subject: Re: Ada Networking (General/Design)
Date: Tue, 14 Aug 2012 17:57:24 +0000 (UTC)
Date: 2012-08-14T17:57:24+00:00	[thread overview]
Message-ID: <k0e3i4$gsr$1@speranza.aioe.org> (raw)
In-Reply-To: 5i0visgzog1.6g1g6fnuefla$.dlg@40tude.net

>>> For non-blocking I/O there should be a way to have a pseudo-task ran by the
>>> events on the socket, rather than scheduled.
>>   That's what overidable procedures When_Connect, When_Readable,
>> When_Disconnect, etc are for.  They are called when the event occurs.
>
>No, that is upside-down. The point is to write I/O code as if it were
>synchronous and half-duplex:
>
>   send
>   receive
>   process
>   send
>   ...
>
>Compare it with Ada task. You write a task as if it didn't share the
>processor, you don't hook at timer interrupts.
  Sorry, I misunderstood "pseudo-task ran by the events on the socket"
to mean roughly "interrupt-driven".  Claw.Sockets has "Async_Socket_Type
and procedures When_xxx for that.  I agree that it's usually easier
to "write I/O code as if it were synchronous and half-duplex:" with
the simple Socket_Type and Put, Get, Process, Put...



  reply	other threads:[~2012-08-17 21:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-12 20:26 Ada Networking (General/Design) Shark8
2012-08-12 23:05 ` Shark8
2012-08-13  0:10 ` sbelmont700
2012-08-13  0:25   ` Shark8
2012-08-13  7:11 ` Dmitry A. Kazakov
2012-08-13 12:33   ` Patrick
2012-08-13 13:11     ` Dmitry A. Kazakov
2012-08-13 13:12     ` Marc C
2012-08-13 13:31       ` Dmitry A. Kazakov
2012-08-13 15:51         ` tmoran
2012-08-13 16:19           ` Dmitry A. Kazakov
2012-08-13 16:30             ` Patrick
2012-08-13 16:53               ` Patrick
2012-08-13 18:18               ` Dmitry A. Kazakov
2012-08-13 20:36               ` anon
2012-08-14  5:40                 ` Patrick
2012-08-13 19:11             ` tmoran
2012-08-13 20:03               ` Dmitry A. Kazakov
2012-08-13 20:28                 ` tmoran
2012-08-14 10:14                   ` Dmitry A. Kazakov
2012-08-14 17:57                     ` tmoran [this message]
2012-08-13 17:54         ` Marc C
2012-08-13 18:28           ` Dmitry A. Kazakov
2012-08-13 18:59             ` Marc C
2012-08-13 19:16               ` Dmitry A. Kazakov
2012-08-14  8:39         ` Maciej Sobczak
replies disabled

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