Skip to content

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

Merged
xvlet merged 1 commit into
masterfrom
feature/server/support-sse
Aug 4, 2026
Merged

feat(server): support SSE, refactor custom routing and optimize socket listeners#3
xvlet merged 1 commit into
masterfrom
feature/server/support-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.

…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 added the enhancement New feature or request label Aug 4, 2026
@xvlet
xvlet merged commit 4315a0a into master Aug 4, 2026
1 check passed
@xvlet
xvlet deleted the feature/server/support-sse branch August 4, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant