My simple IP Socket Server in Python
This is a small python code I wrote to create easily apps that connect using a socket.
The interface is really fast:
from easyserver import *
def on_client(info):
print “Alguien viene… ”
print info.detailsdef on_message(info, msg):
print “Dice: ” + msgdef on_close(info):
print “Se fue…”
print info.detailsEasyServer(20000,on_client, on_message, on_close)
This will call any of those callbacks anytime somebody connects to the server listening in port 20000. More simple is impossible.
Here is the code: easyserver.zip
June 26th, 2010 at 2:54 pm
Es bonico. Seguro que algún dÃa le echo mano.