Python Forum
COMPLETE BEGINNER TO NETWORKING. HELP?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
COMPLETE BEGINNER TO NETWORKING. HELP?
#1
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!
Reply
#2
pyzmq
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
Is there any sort of boiler plate to this?
Reply
#4
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.
Reply
#5
Did you click on the link I posted?
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#6
(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.
Reply
#7
I am asking the OP.
What does OP mean? Undecided
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#8
Original Poster
Reply
#9
I did click on the link, but I'd rather use the socket module.
Reply
#10
(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
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How can I begin learning networking? rohit19 5 3,912 Feb-10-2021, 09:56 AM
Last Post: Naheed
  Networking Help iMuny 1 2,036 Apr-13-2020, 05:37 PM
Last Post: Larz60+
  Networking archer491 0 2,004 Dec-11-2019, 10:17 AM
Last Post: archer491
  Need some help with networking problems... GottaAimHigherPal 6 3,650 Oct-18-2018, 07:41 AM
Last Post: JunaithPetersen
  complete beginner - add upload to a webpage in a script Nnamdug 0 2,185 Dec-27-2017, 05:18 AM
Last Post: Nnamdug
  Python 2 http networking problems, if any Aeneas 1 3,106 Sep-06-2017, 07:24 PM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020