Hi everyone.<br><br>I've not posted here before so let me introduce 
myself.  My name is Ian Macintosh and I've been programming in Pascal on
 and off for some 25 odd years on various applications, mostly business 
and mostly SQL based.  I have only recently tried FPC, specifically via 
Lazarus and it's rather nice IDE.<br>
<br>The reason for writing the list is that I need a game <span class="il">network</span> <span class="il">library</span>
 for my personal use.  Having browsed over the various available 
libraries I don't find anything that quite fits the bill.  Some are just
 plain too much, some are non free, many seem to have fallen into 
various states of disrepair, etc.  The one that seems to almost fit the bill is ENet (<a href="http://enet.bespin.org">http://enet.bespin.org</a>).<br>
<br>I am not averse to writing it myself, and having searched quite 
thoroughly now, see that it is the most likely outcome.  With that in 
mind, I've written up a requirements spec as a broad swipe at the 
problem.  I am hoping that in reading the requirements, the list members
 may be able to possibly suggest an existing suitable <span class="il">library</span>, or suggest additions, deletions or corrections to the requirements spec, or even display an interest in participating in the <span class="il">library</span>.  Any participation, even limited to purely constructive critisism would be appreciated.<br>

<br>Herewith the document itself which will obviously loose some 
formatting in the process.  If you are not averse to seeing it in it's 
Google Docs form, the direct link to the source document is <a href="https://docs.google.com/document/d/1Pt7sK0LphWCGPzaNfTaQ0uRHWe2xZQ26TWDJy1gIGfY/edit" target="_blank">https://docs.google.com/document/d/1Pt7sK0LphWCGPzaNfTaQ0uRHWe2xZQ26TWDJy1gIGfY/edit</a><br>

<br>Please feel free to mail me directly with your comments, flames or 
critique, or to the list if you feel that the subject material suits the
 lists purpose.<br><br>Regards,<br><br>Ian.<br><br>-------<br><br><p dir="ltr">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:48px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:bold">Game <span class="il">Network</span> <span class="il">Library</span></span></p>

<h1 dir="ltr"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:24px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:bold">Requirements</span></h1>
<ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Low level <span class="il">library</span></span></li>
</ul><p dir="ltr" style="margin-left:36pt;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Allows
 other more complex functions to be built on top.  Also allows others to
 choose to use only this part of the <span class="il">library</span> if the higher functions are
 not suitable for their application.</span></p><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Low latency</span></li>
</ul><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">LGPL
 - Free Open Source Software without limitations.  In particular, the 
ability to link it into any program, even a commercial one.</span></li></ul><br><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Session based</span></li>
</ul><p dir="ltr" style="margin-left:36pt;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Support
 session validation via callback and receive/transmit login or 
authentication details.  Allocate a session ID to established 
connections, but allocate decreasingly minimal resources to 
unauthenticated new connections.</span></p><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Inquiry (without a session)</span></li>
</ul><p dir="ltr" style="margin-left:36pt;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Support non-session data enquiry such as for example querying for a list of servers from a master list server.</span></p>

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Unreliable data transfer</span></li></ul><p dir="ltr" style="margin-left:36pt;margin-top:0pt;margin-bottom:0pt">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Not
 all data requires reliable transfer.  For example voice data, if it 
arrives out of sequence or late or never, makes no difference.</span></p><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Reliable data transfer</span></li>
</ul><p dir="ltr" style="margin-left:36pt;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Some data must be delivered.  Support both reliable sequenced and unsequenced data packets.</span></p>

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">

<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Bandwidth limiting per interface</span></li>
</ul><p dir="ltr" style="margin-left:36pt;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">To
 maintain low latency for all connections, do not exceed the interface 
bandwidth capabilities.  Queueing is the enemy of low latency.</span></p><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Bandwidth limiting per session</span></li>
</ul><p dir="ltr" style="margin-left:36pt;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">A
 major factor in multi-user environments is bandwidth costs.  In 
addition, individual bandwidth limits ensure that single sessions do not
 impact the experience of other connections.</span></p><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Single Port UDP only</span></li>
</ul><p dir="ltr" style="margin-left:36pt;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Multiple
 ports are unnecessary.  An extremely trivial overhead of a single byte 
will allow as many concurrent streams of data as are necessary.</span></p><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Non
 blocking when within bandwidth and queue limits.  If bandwidth limits 
are exceeded, make the caller(s) queue, not the traffic.  Not a major 
issue if the caller is multi-threaded.  However when used correctly (ie,
 enquire remaining bandwidth details before creating additional packets)
 will not block.  However, if used incorrectly the <span class="il">library</span> will block 
the caller.</span></li></ul><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"></span><ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">
<span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Apply QOS to all data-grams - default time-critical but allow <span class="il">library</span> user to set another default if required.</span></li>
</ul><h2 dir="ltr"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:19px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:bold">Optional</span></h2>
<ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Payload encryption</span></li>
</ul><p dir="ltr" style="margin-left:36pt;margin-top:0pt;margin-bottom:0pt"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Provide some protection against simple man-in-the-middle traffic manipulation.</span></p>

<h2 dir="ltr"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:19px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:bold">Per session details</span></h2>

<h3 dir="ltr"><span style="font-size:16px;font-family:Arial;color:rgb(102,102,102);background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Bandwidth</span></h3>

<ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Optional limits</span></li>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Statistics</span></li>
<ul><li style="vertical-align:baseline;list-style-type:circle;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Total bandwidth</span></li>
<li style="vertical-align:baseline;list-style-type:circle;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Current moving average</span></li>
</ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Query available bandwidth</span><br>

</li></ul><h3 dir="ltr"><span style="font-size:16px;font-family:Arial;color:rgb(102,102,102);background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Round-trip time</span></h3>

<ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Cumulative average</span></li>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Current moving average</span></li>
</ul><h3 dir="ltr"><span style="font-size:16px;font-family:Arial;color:rgb(102,102,102);background-color:transparent;font-weight:bold;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Packet loss</span></h3>

<ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Cumulative total</span></li>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Current moving average</span></li>
</ul><h2 dir="ltr"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:19px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:bold">Types</span></h2>
<ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Standard unreliable data-grams (i.e. - UDP default)</span></li>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Reliable unsequenced data-grams</span></li>
<li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Reliable sequence data-grams</span></li>
</ul><h2 dir="ltr"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:19px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:bold">Streams</span></h2>
<ul><li style="vertical-align:baseline;list-style-type:disc;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal"><span style="vertical-align:baseline;font-variant:normal;font-style:normal;font-size:15px;background-color:transparent;text-decoration:none;font-family:Arial;font-weight:normal">Multiple streams</span></li>
</ul>