Skip to main content

A DoSP (Data over Socket Protocol) client and server

Project description

DoSP Protocol Specification

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

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

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

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

server = Server(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

  • allow SD (Save/Load data) in server
  • encrypt messages between 2 clients (fix)

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: dosp-0.1.1.tar.gz
  • Upload date:
  • Size: 18.4 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.1.tar.gz
Algorithm Hash digest
SHA256 7feca7314359cde9b771950b5b59e4a75236752b175a4ef203f5bbc3c0f52744
MD5 f09cca815a9ef37f85053b0c217a5ae1
BLAKE2b-256 5c61a3405b385a1346ea71f21fbaab0785a5bf8bd5c9ca031ceb079c6321409b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dosp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.2 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a464c3456ec3de87672e9e40d0a24b157516aa87efe5fd995f89d51671467c1
MD5 26b06ed1a200efe50c069d6256460a9e
BLAKE2b-256 d693d22e6468218b332e369dc67190f07e28cf3df94d4168236b5bc18ba7ab50

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