maxwelllink.sockets.protocol module

Wire protocol for every MaxwellLink socket connection.

This module is the single home of the byte formats exchanged between the socket hubs and their three client families:

  • mxl_driver Python clients and the LAMMPS fix mxl client speak the i-PI-style header protocol (STATUS/INIT/POSDATA/GETFORCE/…), including the fixed-layout fast path used by SocketHub.step_barrier.

  • mxl_bridge aggregate nodes speak the AGG frame protocol (AGGHELLO/AGGINIT/AGGSTEP/AGGRESULT).

  • Meep’s C-level MXLSocketSusceptibility client reuses the AGG step/result frames after its MXLINIT handshake (see _meep_hub_base.py).

Because the counterparts live outside this package (LAMMPS C++ driver, Meep’s src/susceptibility.cpp), every byte layout in this file is frozen: change nothing here without bumping the protocol versions and updating those clients. The layouts are pinned by golden-bytes tests in tests/test_sockets.

This module intentionally imports nothing from the rest of MaxwellLink so any driver- or hub-side code can depend on it without import cycles.