Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » TCP Client Server

This thread is locked; no one can reply to it. rss feed Print
TCP Client Server
Xpicolo
Member #16,781
December 2017

Hi,
Is there an addon for Network TCP sockets?
What you use?

Thanks

Chris Katko
Member #1,881
January 2002
avatar

There is no official one. The reason is, most people with roll their own (because it's so intruisive/coupled to your specific game structures), or, use one of the many thoroughly vetted third-party libraries already out there:

https://www.codeofhonor.com/blog/choosing-a-game-network-lib

https://gamedev.stackexchange.com/questions/394/network-layer-libraries

Here's a very popular one:

http://www.jenkinssoftware.com/

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Specter Phoenix
Member #1,425
July 2001
avatar

Gah. Does no one pay attention anymore?

I'm not sure they ever did.

l j
Member #10,584
January 2009
avatar

I'm not sure they ever did.

The internet isn't helping, only makes it harder to pay attention to anything.

Chris Katko
Member #1,881
January 2002
avatar

I disagre---hang on, gotta check my twitter.

What were we talking about?

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs
"Political Correctness is fascism disguised as manners" --George Carlin

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Elias
Member #358
May 2000

Do you have screenshots of the network example?

--
"Either help out or stop whining" - Evert

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

What's this? NSND?

Lulz, all it does is draw a circle and let you move around. There is a binary of ex_enet_client and server.exe in my distro. Try it yourself. It's not much fun playing on your own local network.

Here's a better screenie :
{"name":"611155","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/d\/5db22c862d1491b7dd138bdb51e5ed56.png","w":1572,"h":797,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/d\/5db22c862d1491b7dd138bdb51e5ed56"}611155

{"name":"611154","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/7\/5730524b3644dd3e23d46b0b01e0ee52.png","w":642,"h":513,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/5\/7\/5730524b3644dd3e23d46b0b01e0ee52"}611154

Xpicolo
Member #16,781
December 2017

Gah. Does no one pay attention anymore?
I ask for TCP, right? Enet is UDP.
That is, "The internet isn't helping, only makes it harder to pay attention to anything".

Thanks anyway for advices.

beoran
Member #12,636
March 2011

For TCP, dyad is really easy to use: https://github.com/rxi/dyad/blob/master/README.md Just call dyad_update from time to time in your game loop.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Go to: