• exec/broker.js

    From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 12:36:17 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/93915f2047473b600a068628
    Added Files:
    exec/broker.js
    Log Message:
    Add a pure-JS MQTT broker

    This is not nearly ready for full-time yet, but it seems to mostly
    limp along fine... there's some issues with the callbacks and such,
    and the TLS support isn't currently usable by Synchronet.

    Worth committing though.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 12:50:57 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/dd197ac84a0b6a25ab8228c2
    Modified Files:
    exec/broker.js
    Log Message:
    After receiving all packet data, receive the next packet.

    This appears to be why it was hanging. :D

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 13:05:31 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/dfd5de5ebbc84a6b1c8ba240
    Modified Files:
    exec/broker.js
    Log Message:
    Log who packets are going to/from, fix potential leak in previous commit

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 14:26:49 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/a7077e521bce216f23b7d19e
    Modified Files:
    exec/broker.js
    Log Message:
    More fixes... it seems broadly usefulish now

    - Increment bytes required for every extra VBI byte we learn about
    - If sock is null, don't look at sock.connection
    - Set sock to null after close
    - Don't read from sock unless we need some bytes
    - If we already have some bytes, parse them

    There's a couple hacks in here that should be refactored though.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 14:27:49 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/0f70b2c035d9bc39794571ea
    Modified Files:
    exec/broker.js
    Log Message:
    Set sock to null *after* closing it.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 14:28:34 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/a0b9a6db486a0be43e52520f
    Modified Files:
    exec/broker.js
    Log Message:
    ... But only if it's not null already.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 14:59:34 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/86e9f99ac0330efea3bcf3ed
    Modified Files:
    exec/broker.js
    Log Message:
    Do some of that refactor

    Add a nextPacket() method that will get the next packet
    Add a Connection.parseBytes() method to consume the rx_buf
    Simplify Packet.newBytes() to only do socket recv()
    Clear RX buffer when closing socket

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 16:11:17 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/50dbbce372274f5830d91620
    Modified Files:
    exec/broker.js
    Log Message:
    Fix inverted comparisons in SUB and UNSUB messages

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 20:46:08 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/39cfd9f8907867a961d1a651
    Modified Files:
    exec/broker.js
    Log Message:
    Make broker.js capable of running as a static service.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Fri Jan 31 23:57:09 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/c5aaba6c72b31b74e3179f87
    Modified Files:
    exec/broker.js
    Log Message:
    Add some documentation about how the script works.

    As always when writing documentation, fix things that aren't quite
    right... we now schedule nextPacket, but run each packet to
    completion as long as we have all the bytes.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sat Feb 1 12:41:46 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/7907e9a5c6fce570b1f4cf0b
    Modified Files:
    exec/broker.js
    Log Message:
    Call client_add()/client_remove() as appropriate

    For when running as a service.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net