Skip to content

Instantly share code, notes, and snippets.

@nakaz
Last active September 19, 2017 01:51
Show Gist options
  • Save nakaz/3defa4a4282cd5da1c199c079044b146 to your computer and use it in GitHub Desktop.
Save nakaz/3defa4a4282cd5da1c199c079044b146 to your computer and use it in GitHub Desktop.
A python chat server for all sneks to sssssspeak with each other

Nest Chat

Def "Nest": a group of snakes, vipers, or in this case, pythons.

A place for all pythonists to sssssssspeak with each other.

Goals

You will need the sys standard library.

server.py

Use the socket library to create a new server that listens on a specified address 0.0.0.0 and port 5555 and listens for and accepts socket connections.

Should reply back to a socket when data is received from the respective socket.

client.py

Create a new socket to connect to your server.

A client should be able to write data into the socket connected to the server.

Whenever the socket (server) emits data, client should be able to print it into the standard output stream.

Stretch goals

  • Allow server to handle many clients and send data given from one client to all connected clients on the server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment