Skip to main content

A DoSP (Data over Socket Protocol) client and server

Project description

DoSP Protocol Specification

PyPI - Version GitHub Actions Workflow Status

DoSP (Default or Simple Protocol) — TCP-протокол, работающий по умолчанию на порту 7744. Используется для маршрутизации и пересылки сообщений между клиентами через центральный сервер.


📦 Message Format

B = Byte(s)
b = bit(s)  
[2B TYPE] [4B LENGTH] [optional 4B DST_IP] [PAYLOAD]
  • TYPE: Тип сообщения (1 байт)
  • LENGTH: Длина пакета, включая payload и DST_IP (если присутствует)
  • DST_IP: Адрес получателя (если требуется)
  • PAYLOAD: Полезная нагрузка

🔤 Message Types

Name Hex Description
MSG x01 Сообщение
PING x02 Ping
S2C x03 Отправка другому
GCL x04 Получения клиентов
FN x05 Запустить функцию
SD x06 Server Data
RQIP x07 Запрос IP
GSI x08 Получить self-info
SA x10 Ответ сервера
EXIT x11 Выход
ERR x12 Ошибка
AIP x13 Назначенный IP
HSK x14 HandShake

types before 0x20 are reserved for build-in functions other types are reserved for future use

🌐 vIPv4 — Virtual IP v4

Каждому клиенту сервер присваивает виртуальный IPv4-адрес по шаблону:

"7.10.0.{x}" # x начинается с 2

  • Адрес назначается при подключении (AIP)
  • Используется для маршрутизации в S2C
  • IP может быть задан как 10.0.0.{x}, 192.168.1.{x} и т.д.

🧠 Assign IP example

При старте сервера:

import dosp.server as dosp_server
server = dosp_server.DoSP(ip_template="10.0.0.{x}")
server.start()

Клиенты получат IP вида 10.0.0.2, 10.0.0.3, …


Interactive Client (IMC)

Interactive Message Client is client (made by themaster1970sf) allows to send messages to server and other clients, for full command list type /help after starting client


TODO

  • [X] allow SD (Save/Load data) in server (Not planned anymore)

Project details


Download files

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

Source Distribution

dosp-0.1.2.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dosp-0.1.2-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file dosp-0.1.2.tar.gz.

File metadata

  • Download URL: dosp-0.1.2.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dosp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7db12d8d259c2faa0a9cfa5c149611a3c74f87b45a3fd0ebf8bd0d80398cab93
MD5 1e8cd14c3b19dd0033b164ebc5d16dc2
BLAKE2b-256 21f478cc88cf7f4c1d4b4d2d834854830fdf51deca13f602142b6a89f2e4db58

See more details on using hashes here.

File details

Details for the file dosp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dosp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dosp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8c32db1ea543e174234ea098b799586a9f960945f5113bd202fe2d3a9c4bf3b6
MD5 4a4a33b2ed372a549e3febc8105d894d
BLAKE2b-256 21f22cb3133d41814ad70a5512b73dfd52bee775cce698b06fae4261d771b4c7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page