How use the UDP network ?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Linkpy
Party member
Posts: 102
Joined: Fri Aug 29, 2014 6:05 pm
Location: France
Contact:

How use the UDP network ?

Post by Linkpy »

Hello !

I was wondering how games uses the UDP packets. Like the Source engine, which use TCP and UDP for communication.

I know that the TCP is a connection, and the UDP a stream, and don't need a connection. But, how games handle UDP packet ? Or, if I make a game using UDP, how should I use it ? I'm used to TCP, but not the UDP. :crazy:

Did you have any tips ?
Thanks !
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
User avatar
Tjakka5
Party member
Posts: 243
Joined: Thu Dec 26, 2013 12:17 pm

Re: How use the UDP network ?

Post by Tjakka5 »

I'd suggest reading trough the tutorial on the love wiki; it explains how to setup a (basic) network.
https://love2d.org/wiki/Tutorial:Networking_with_UDP
User avatar
Linkpy
Party member
Posts: 102
Joined: Fri Aug 29, 2014 6:05 pm
Location: France
Contact:

Re: How use the UDP network ?

Post by Linkpy »

Oh, okay. For avoid fake packet, the server uses a TCP and UDP communication, and when it receive a UDP packet, it's check if the IP of the sender is valid (so, if the IP is also connected with the TCP) ?
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 59 guests