Basic Socket Server

Avatar of 黃柏竣 Bo-Jun Huang.
Avatar of 黃柏竣 Bo-Jun Huang.

Basic Socket Server

Software Engineer
Taichung City, Taiwan

Concept Map

Basic Socket Server

Implementing front-end and back-end separation for a local application using socket connections to achieve data transmission functionality.

Features:

1.Customizable IP address, port number, header length, and built-in log file.

2.Ability to add command actions using @registCommand.

3.Undefined command will not have any effect.

4.Using ascii string to format command.

You can simply use server.Binding() and then server.run() to execute.

After defining the behaviors for different commands in the server, you can trigger the server's actions from the client side using socket.send("commandName", "args").


source code: https://github.com/seikimaii/BaseSocketServer/blob/main/BaseSocketServer.py

Implementing front-end and back-end separation for a local application using socket connections to achieve data transmission functionality.
Avatar of the user.
Please login to comment.

Published: Aug 11th 2023
58
3
0

Tools

python
Python

socket server

Share