1

I've search a little bit on net about urllib library in python 2.7, due to my friend's tip and because I've already used for a while. Well, what I really wanna know is about indications. Supposing I desire to create a application that is going to be used in a specific device that communicates with another device with same application, e.g A message application, or even a virtual simple game (using only the network), what are the possible libraries I can use? If some of you've already used anything to build a similar application, please, I'll appreciate your knowledge.

  • I suggest taking a look at ØMQ (ZeroMQ). It provides high performance, scalable async messaging without a broker (hence the Ø) and has a binding for Python (http://zeromq.org/bindings:python). For more info see http://zeromq.org/. There is a two part intro to it at https://www.digitalocean.com/community/tutorials/how-to-install-zeromq-from-source-on-a-centos-6-x64-vps and https://www.digitalocean.com/community/tutorials/how-to-work-with-the-zeromq-messaging-library. –  Aug 21 '15 at 03:43

1 Answers1

1

It sounds like you want to develop an application specific protocol which is different than HTTP.

HTTP is carried over TCP and Python connects to TCP transports with the standard socket module. There is a small overview of the use of sockets in the Python standard documentation.

The most important part of your new protocol is ensuring each side knows when the other side has sent a complete message. This can be very simple (each message ends with a newline) to as complex as you need.

msw
  • 42,753
  • 9
  • 87
  • 112