Jump to content
Sign in to follow this  
  • entries
  • comments
  • views


Sign in to follow this  
Evil Steve


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, 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  


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
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!