Skip to content

feat(server): support SSE, refactor custom routing and optimize socket listeners - #5

Merged
xvlet merged 3 commits into
masterfrom
fix/server/sse
Aug 4, 2026
Merged

feat(server): support SSE, refactor custom routing and optimize socket listeners#5
xvlet merged 3 commits into
masterfrom
fix/server/sse

Conversation

@xvlet

@xvlet xvlet commented Aug 4, 2026

Copy link
Copy Markdown
Owner
  • Config: Added /test/api/sse route mapping in config.yml.
  • Handlers: Implemented SSEHandler to simulate Server-Sent Event streaming.
  • Handlers: Introduced GetCustomHandler to decouple custom route mappings from the main server loop.
  • Server: Refactored main.go to use GetCustomHandler instead of hardcoding API paths.
  • Server: Disabled the main Echo startup banner to keep HTTP and WebSocket startup logs aligned.
  • Server: Upgraded WebSocket handler to properly echo text frames (string payloads), bypass strict origin checks, and log incoming messages.
  • Server: Replaced standard echo.Start with custom net.ListenConfig for both HTTP and WebSocket servers to enable SO_REUSEADDR and SO_REUSEPORT socket options.
    4315a0

xvlet added 3 commits August 4, 2026 17:13
…t listeners

- Config: Added /test/api/sse route mapping in config.yml.
- Handlers: Implemented SSEHandler to simulate Server-Sent Event streaming.
- Handlers: Introduced GetCustomHandler to decouple custom route mappings from the main server loop.
- Server: Refactored main.go to use GetCustomHandler instead of hardcoding API paths.
- Server: Disabled the main Echo startup banner to keep HTTP and WebSocket startup logs aligned.
- Server: Upgraded WebSocket handler to properly echo text frames (string payloads), bypass strict origin checks, and log incoming messages.
- Server: Replaced standard echo.Start with custom net.ListenConfig for both HTTP and WebSocket servers to enable SO_REUSEADDR and SO_REUSEPORT socket options.
…t listeners

- Config: Added /test/api/sse route mapping in config.yml.
- Handlers: Implemented SSEHandler to simulate Server-Sent Event streaming.
- Handlers: Introduced GetCustomHandler to decouple custom route mappings from the main server loop.
- Server: Refactored main.go to use GetCustomHandler instead of hardcoding API paths.
- Server: Disabled the main Echo startup banner to keep HTTP and WebSocket startup logs aligned.
- Server: Upgraded WebSocket handler to properly echo text frames (string payloads), bypass strict origin checks, and log incoming messages.
- Server: Replaced standard echo.Start with custom net.ListenConfig for both HTTP and WebSocket servers to enable SO_REUSEADDR and SO_REUSEPORT socket options.
@xvlet
xvlet merged commit 26b2863 into master Aug 4, 2026
1 check passed
@xvlet
xvlet deleted the fix/server/sse branch August 4, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant