Skip to main content

A library help to build tcp server/client application

Project description

A library based on asyncore, used to build tcp server/client application communicating each other with customized messages.



import asynmsg

class ServerSession(asynmsg.SessionS):

    def on_Login(self, msg_id, msg_data):
        self.send_message('LoginAck', 'login success')

class Server(asynmsg.Server):
    session_class = ServerSession

Server(('', 12345))


import asynmsg

class ClientSession(asynmsg.SessionC):
    def on_opened(self):
        self.send_message('Login', 'test1')

    def on_LoginAck(self, msg_id, msg_data):

class Client(asynmsg.ClientBlockConnect):
    session_class = ClientSession

client = Client(('', 12345))
if client.is_started():

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for asynmsg, version 0.2.4
Filename, size File type Python version Upload date Hashes
Filename, size asynmsg-0.2.4-py3-none-any.whl (9.0 kB) File type Wheel Python version 3.6 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page