I've had to re-do the code a little. There's now two engine-level server classes, one for TCP and one for UDP. The TCP one returns a connected socket and the UDP one returns packets. A UDP server can be set to only accept packets from a particular IP, or it can accept all packets.
And the UDP connection class (outbound socket) can be created to "connect" to 255.255.255.255, which will cause it to broadcast packets. The UDP connection class doesn't really connect as such. It makes a call to connect(), which binds to an address so all data sent will go to that address. So I suppose it is a connection of sorts.
I'm not sure about my TCP/IP socket class. I'd like to get everything into a "packet-based" state, but stream based could be useful too. Adding "packet based" support means adding additional data to the stream (packet size), which means the TCP socket type couldn't be used for normal TCP/IP traffic like telnet or HTTP stuff.
So I guess I'll have to add it as a layer on top (but still in the engine). Oh well.