Remnant Chat Beta (Uses UDP)

Post here early releases of your Halo 2 mod project.
Post Reply
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Remnant Chat Beta (Uses UDP)

Post by Click16 »

Hey, I've been getting more and more interested in network programming, and I decided to just revisit this old project just for fun. I completely removed the old FTP style, and now its all UDP network code.

If you want to download this and help me test it, you can download the attachment, or from the Dropbox Link.

Remnant Chat (Dropbox)

Image
Attachments
Remnant Chat.zip
Remnant Chat v1.5.0.3
(303.98 KiB) Downloaded 285 times
Last edited by Click16 on Wed Jun 03, 2015 7:00 am, edited 16 times in total.
Image
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Remnant Chat Beta (Uses UDP)

Post by troymac1ure »

Seems like a much better solution than FTP ;) Next time I'm on my laptop I'll d/l it & fire it up.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Remnant Chat Beta (Uses UDP)

Post by Click16 »

Updated the attachment because of an error with the client.
Addressed an issue where the client times out and stops accepting the server's packets after a certain period of time, fixed this by sending a test packet to the server, than back to the client every 10 seconds.

Oh and I made the window flash if it doesn't have focus and a message is received.
Image
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Remnant Chat Beta (Uses UDP)

Post by Click16 »

Updated the client once more
Image
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Remnant Chat Beta (Uses UDP)

Post by Click16 »

Big client update, Added client-end command support, whispering (or private messaging), and client text colors. Also increased packet size so more text can be sent per message
Image
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Remnant Chat Beta (Uses UDP)

Post by OwnZ joO »

So why did you decide to go with UDP over TCP?
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Remnant Chat Beta (Uses UDP)

Post by Click16 »

UDP is a connectionless protocol, which makes it easy to handle multiple users on a single port, where I believe TCP can only have one client connected at a single time which would be doable, but there might be a delay between when you try to send a message, and when the server actually accepts the request. Also TCP seems to be slower.
Image
User avatar
OwnZ joO
Posts: 1197
Joined: Sun Dec 09, 2007 4:46 pm

Re: Remnant Chat Beta (Uses UDP)

Post by OwnZ joO »

You can have multiple connections to the same port on a server, the server listens on that port and then binds to any incoming connections. The process of binding to the client creates a socket that uses an ephemeral port so the server writes to the clients on different ports. If you're trying do to a chat app then I would guess you might want to go with TCP as it has guarantees that it will reliably deliver the data you send, in the order that you sent it or at least let you know that it failed. The reason UDP is faster as that it doesn't have any of those guarantees, it is usually used for like streaming video and other stuff where performance is more important than correctness 100% of the time.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Remnant Chat Beta (Uses UDP)

Post by Click16 »

Updated to version 1.4.0.0 The server software is going to be running all the time now, so you should be able to connect anytime now!
Image
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Remnant Chat Beta (Uses UDP)

Post by troymac1ure »

Thought I'd see how it was... Crash! Happens right after hitting "Join"
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Remnant Chat Beta (Uses UDP)

Post by Click16 »

Hmm that's strange because I'm not getting any errors. I could probably release it with the PDB files, so when it crashes, you can attach the program to VS and see what line of code threw the exception.

EDIT: Looking at the server output, the server said you were joining, but I'm guessing the crash caused you to time out.
Image
User avatar
troymac1ure
Keeper of Entity
Posts: 1282
Joined: Sat Aug 09, 2008 4:16 am
Location: British Columbia, Canada, eh
Contact:

Re: Remnant Chat Beta (Uses UDP)

Post by troymac1ure »

Post the PDB up, still crashing.
Image
User avatar
DoorM4n
Posts: 2154
Joined: Sun Dec 09, 2007 3:01 am
Location: Houston

Re: Remnant Chat Beta (Uses UDP)

Post by DoorM4n »

I think this is the beta. Use the new one he gave me a few days ago.
Last edited by DoorM4n on Tue Jul 15, 2014 4:42 am, edited 1 time in total.
Image
Remnant! We were the last stand.
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Remnant Chat Beta (Uses UDP)

Post by Click16 »

Updated to version 1.5.0.1
Image
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Remnant Chat Beta (Uses UDP)

Post by Click16 »

Updated to 1.5.0.2. This version allows you to disable the warning message when you click on a link in chat.
Image
User avatar
Click16
Posts: 1941
Joined: Mon Dec 31, 2007 4:36 am
Location: United States

Re: Remnant Chat Beta (Uses UDP)

Post by Click16 »

*caugh* bump, Updated to v1.5.0.3 I don't know what was changed, but the project's version didn't match this release's. :P
Image
Post Reply