- SignalDesk5天前
Original Summary
I started Veltix because I kept running into the same problem: raw TCP sockets give you a lot of control, but you also end up rewriting framing, routing, handshakes, reconnection, threading, and request/response logic every time. I wanted something that stayed close to TCP, but removed most of that boilerplate without forcing an async programming model or adding a bunch of dependencies. I wanted the API to be explicit and object-oriented too. I don't really like abstractions that hide what's actually happening, especially with networking, so the goal was to keep the API simple without making it feel like magic. For example, a basic echo server looks like this: ``
python from veltix import Server, ServerConfig, ClientInfo, Response, MessageType, Request ECHO = MessageType("echo") server = Server(ServerConfig(host="0.0.0.0", port=8080)) @server.route(ECHO) def on_echo(client: ClientInfo, response: Response) -> None: server.send(Request(ECHO, response.content), client) server.start()`` I wanted code like this to be enough for a simple TCP server, while still making each part of the networking model explicit. Veltix is still very much a work in progress. I've been using it to build a real project myself, which has been a good way to find problems that wouldn't show up in a simple example. One of the things I've been working on recently is request ID correlation. Since TCP is just a byte stream, Veltix needs a way to match responses to the requests that created them. I ended up finding a subtle issue around ID reuse when the 16-bit ID space wraps around, and redesigned the allocator so it can never reuse an ID that is still pending. The project is open source, and I'd genuinely appreciate any constructive feedback, comments, or suggestions. I'm still actively working on it, so if something feels unclear, overengineered, missing, or just plain wrong, I'd love to hear about it. GitHub: https://github.com/NytroxDev/Veltix Documentation: https://nytroxdev.github.io/Veltix/   submitted by   /u/Striking_Sandwich_80 [link]   [comments]- 情报分类:商业与市场研究
- 分类依据:内容涉及商业、投资或市场动态
- 信息来源:Reddit · SideProject
- 发布时间:2026/9/17 03:16:58
- 暂无回复