I've designed a bunch of socket classes and derivatives.
We (myself, my peers, and the OA dev team) are currently prooftesting them.
The two main components are banked and iocp socket models.

Watch this space !!
Posted on 2005-05-27 08:32:35 by Homer
Here is the OA32 base socket class.
You can use it like this, or derive something from it that's more to your liking, or you can modify this one (rename it if you do), or you can swing it from a yard-arm, or use it as a doorstop.
Next time I'll post SocketBank class  8)
In the meantime, please let me know if you discover any issues, or have suggestions for improving this class, and any others which I post here.
I waive all rights to any sourcecode which I post in public, so rest assured you can, as I have suggested, do anything you like with it.

Have a nice day :)
Attachments:
Posted on 2005-05-28 13:10:07 by Homer
Stage Two - GenericServer class provides base support for a more specialised SpecificServer class.
I'll post an example SpecificServer next, but note that SpecificServer is merely an example - this is where YOUR class belongs, where you implement protocol ;)

Attachments:
Posted on 2005-06-05 10:17:51 by Homer
Homer,
Thanks for sharing. Ill look at these a.s.a.p.
Rgs, James.
Posted on 2005-06-05 15:50:02 by James_Ladd
I'm way ahead of this - I'm only posting what I feel is no longer subject to change without notice..
Posted on 2005-06-05 23:50:20 by Homer
Here's a relatively simple class which implements the Extended Overlapped structure and other per-client information.. the first step towards a heap-based client pool.
Currently only Constructor and Destructor methods have been defined.
I would like some feedback on what other class methods you would find useful.

Note that it derives from the Primer class.
Although not strictly a requirement of OA32 classes (as Primer itself testifies), there's a couple of good reasons for doing this, such as the inherited ability to set an Owner for Client objects, which in turn allows a Client object to call methods within its Owner.
In my Banked socket model, I used this mechanism to implement a "zombie kill timed callback" whereby a Socket which had been Accepted but had not received ANY data within N seconds asynchronously destroyed itself, and removed itself from its Owner pooling object.
This eliminated the need for a "maintenance cycle" such as I've seen other examples using, but also meant that the pooling object needed to have a "threadsafe" synchronisation mechanism (I used CriticalSection).

Have a nice day :)
Attachments:
Posted on 2005-06-12 00:42:47 by Homer
Here is the CURRENT VERSION of the Client class.
It's changed considerably !!
A bunch of code from the Server class now resides here.

Attachments:
Posted on 2005-06-14 23:44:41 by Homer