Sign in to follow this  
AuZ

In game chat

Recommended Posts

Right, I have a multiplayer version of bomberman (2D) working quite well, and I would like to create an online chat thing to go with it. Now I have a little problem of theory here. Say I am using port number X to connect to the other person with a UDP connection (for moves...), Am I allowed to create a TCP connection on the same port to carry my chat data ? It may sound very newbish (apologies...) but how would you go about creating an online chat built in within an application ? Thanks in advance.

Share this post


Link to post
Share on other sites
I'd just send the message through the same UDP socket, and work out a simple reliable message system, nothing complicated.

Share this post


Link to post
Share on other sites
Ports are just arbitrary numbers and they're specific to the protocol in question. Therefore TCP port 1234 and UDP port 1234 are entirely unrelated. So you can use the same port number for both if you like, but there's no benefit or penalty for doing so.

Share this post


Link to post
Share on other sites

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

Sign in to follow this