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.3.tar.gz (20.2 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.3-py3-none-any.whl (21.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dosp-0.1.3.tar.gz
  • Upload date:
  • Size: 20.2 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.3.tar.gz
Algorithm Hash digest
SHA256 2ab41e25519d6025dcb45412f9ba0c4341cdee58f8326a530c00fcd405fda9f9
MD5 d2b7d2255f348b88750dd9e4a922a1ea
BLAKE2b-256 6a8e79f7c171d1c24470984d6048c975f30972e9fb23798cc392950951f5ba30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dosp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 21.9 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 324347034da5d04c491ffb3a2621e28ab81aee56dc267547beb1ac903b78be17
MD5 c2819aa98ebf7494d219756d89bf10ee
BLAKE2b-256 867e545e58cd911bb8db38436c74be4fb14cf211f3ec36e4ad870818a91d0b5b

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