Skip to content
This repository was archived by the owner on Jan 21, 2026. It is now read-only.

v0.6.0

Choose a tag to compare

@MegaGrindStone MegaGrindStone released this 08 Mar 18:30
· 14 commits to main since this release

This release focuses on significant architectural improvements, introducing the new Server struct with comprehensive ping management capabilities, enhanced connection lifecycle options, and a more responsive client connection model. The changes provide better resource management through dedicated session control methods and a new in-memory server implementation, while simplifying the timeout handling approach through context-based parameters.

Added

  • Add automatic server session closure when ping timeout threshold is exceeded.
  • Add Server struct that replaces the previous Serve function with equivalent functionality.
  • Add ping management options for server: WithServerPingTimeout and WithServerPingTimeoutThreshold.
  • Add server lifecycle callback options: WithServerOnClientConnected and WithServerOnClientDisconnected.
  • Add connection management methods: Disconnect for Client struct and Shutdown for ServerTransport interface.
  • Add ping management options for client: WithClientPingTimeout and WithClientOnPingFailed.
  • Add Stop method to Session interface for controlled session termination.
  • Add WithSSEClientMaxPayloadSize option to configure maximum payload size in SSE clients.
  • Add memory server implementation.

Changed

  • Modify Connect method to return immediately after session establishment instead of blocking indefinitely.
  • Update StartSession method in ClientTransport to return a Session object instead of an iterator.

Removed

  • Remove WithServerWriteTimeout and WithServerReadTimeout options as they are no longer necessary with the new timeout model.
  • Remove WithClientWriteTimeout and WithClientReadTimeout options in favor of using context timeout parameters.
  • Remove Serve function in favor of the more flexible Server struct implementation.
  • Remove Send function from ClientTransport interface as this functionality is now handled by the Session interface.