Python Forum
COMPLETE BEGINNER TO NETWORKING. HELP? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Networking (https://python-forum.io/forum-12.html)
+--- Thread: COMPLETE BEGINNER TO NETWORKING. HELP? (/thread-7311.html)

Pages: 1 2


COMPLETE BEGINNER TO NETWORKING. HELP? - ShadowWarrior17 - Jan-03-2018

I am looking to create a LAN game on python. I am currently in the works of a connect four game.

Can anyone tell/show how to setup a server, so it's only with two people, ensure it has a password, and explain to me how to implement the sharing of moves between network?

Thanks!


RE: COMPLETE BEGINNER TO NETWORKING. HELP? - wavic - Jan-03-2018

pyzmq


RE: COMPLETE BEGINNER TO NETWORKING. HELP? - ShadowWarrior17 - Jan-04-2018

Is there any sort of boiler plate to this?


RE: COMPLETE BEGINNER TO NETWORKING. HELP? - mpd - Jan-04-2018

The socket documentation has an example of an echo client/server: https://docs.python.org/3/library/socket.html The server reads messages from the client and then sends them back to the sender. Change that to accept two connections and have the server forward messages from one client to the other. Your game mechanics can be encoded as strings, e.g., "MOVE <COLUMN #>" and parsed at each client.


RE: COMPLETE BEGINNER TO NETWORKING. HELP? - wavic - Jan-04-2018

Did you click on the link I posted?


RE: COMPLETE BEGINNER TO NETWORKING. HELP? - mpd - Jan-04-2018

(Jan-04-2018, 07:05 PM)wavic Wrote: Did you click on the link I posted?

I'm not sure if you're asking me or the OP but I'll answer. Yes I did.


RE: COMPLETE BEGINNER TO NETWORKING. HELP? - wavic - Jan-04-2018

I am asking the OP.
What does OP mean? Undecided


RE: COMPLETE BEGINNER TO NETWORKING. HELP? - nilamo - Jan-04-2018

Original Poster


RE: COMPLETE BEGINNER TO NETWORKING. HELP? - ShadowWarrior17 - Jan-04-2018

I did click on the link, but I'd rather use the socket module.


RE: COMPLETE BEGINNER TO NETWORKING. HELP? - wavic - Jan-05-2018

(Jan-04-2018, 08:47 PM)ShadowWarrior17 Wrote: I did click on the link, but I'd rather use the socket module.

It's good for learning but finally, you will end with something like pyzmq