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.0.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.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dosp-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 d327a5f3331a0ac517c41d6984e6e75d9bc5959264edcc6a00251dd8ddd56d18
MD5 3b87d63d55dbd29b205cbcc923af8260
BLAKE2b-256 0dc7dde1a4f8b7814f0d7cf6dbfab0dd0a63246db6a7c1f5f6fde28ba318de05

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dosp-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c90aae705a7d7ffa2f2f2ce8c4919e48afeac9a6f51447f57ac3faf73fd03c08
MD5 92badb7e1be2bd1967c300bde0eb462f
BLAKE2b-256 d13f669e859d2adb907507197024a16a4c2cfbe184c789b10f549c59ce43dbe0

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