BSD sockets API extensions that would be nice for real-time apps
It ought to change. We ought
to have some far more serious real-time network API's than what exists
in BSD sockets. The first things I can think of wanting are,
- make my UDP
sendto()
's block if there's no buffer
space, like writing to a pipe or a TCP socket
- how much buffer space is
available - used = free
on
this socket? This has to be carefully-defined because that equation
does not hold. There are headers on datagrams. If you have 64kByte
available, you can't send 65536 one-byte datagrams. There's already
an API to change this available
size, though I'm not sure
it's consistent across BSD, Linux, Solaris.
- to what point in this TCP stream have we received
acknowledgements? I would like this. There ought to be a blocking
version of this question, too---
shutdown()
this socket
for sending, wait as long as you're going to wait, and then tell me
how much (if not all) of the data I wrote to the socket was
acknowledged by the other end.
- What is the statistically estimated latency and jitter of this TCP
stream, and are these numbers you're giving me actually any good, or
has the socket just opened?
- There should be a multicast datagram socket in the Unix domain. :)
L3 switches / map / carton's page / Miles Nordin <carton@Ivy.NET>
Last update (UTC timezone): $Id: switch-realtime-bsdsocketsapi.html,v 1.1 2008/01/11 03:31:01 carton Exp $