Sign in to follow this  
  • entries
    557
  • comments
    1237
  • views
    421520

Untitled

Sign in to follow this  
Evil Steve

54 views

Woo, UDP network code is working now.

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.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now