Skip to content

Conversation

@hyprh
Copy link
Contributor

@hyprh hyprh commented May 30, 2025

Synchronize the latest code internally

🚨 Breaking Changes

1. WebSocket Interface Changes

New Method Added

  • Added: ReadAnyMessage() (MessageType, []byte, error)
    • Purpose: Reads a data message of any kinds, including control frames
    • Note: Control frames returned by this method will not be automatically handled by default or customized control frame handlers
    • Concurrency: Not concurrent safe, do not use in multiple goroutines

API Recommendation Change

  • Previous: ReadMessage() was the primary method
  • Current: ReadAnyMessage() is now recommended over ReadMessage()
  • Impact: While ReadMessage() is still available, the documentation now suggests using ReadAnyMessage() may lead to blocking goroutines in scenarios with interleaved control and data frames

Enhanced Documentation

  • Added comprehensive documentation for NextMessageReader() with detailed usage examples
  • Added warnings about concurrent usage
  • Provided example code for treating WebSocket as a plain byte stream protocol

2. Global Variable Type Changes

MassiveConnections Variable

  • Previous: var MassiveConnections bool
  • Current: var MassiveConnections atomic.Bool
  • Impact:
    • Direct boolean operations will no longer work
    • Must use .Load() and .Store() methods
    • Affects code that directly reads/writes this variable

3. Function Signature Changes

TCP Service Callback Functions

  • Changed: tcpServiceOnRead(data any, _ *iovec.IOData)tcpServiceOnRead(data interface{}, _ *iovec.IOData)
  • Impact: Code that overrides or directly calls this function will fail to compile

@hyprh hyprh changed the title merge target: Merge made by the ort strategy merge v1.0.1: Merge made by the ort strategy Jun 4, 2025
@hyprh hyprh closed this Jun 5, 2025
@hyprh hyprh reopened this Jun 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2025
@trpc-group trpc-group unlocked this conversation Jun 5, 2025
@hyprh
Copy link
Contributor Author

hyprh commented Jun 5, 2025

I have read the CLA Document and I hereby sign the CLA

@hyprh hyprh closed this Jun 5, 2025
@hyprh hyprh reopened this Jun 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2025
@trpc-group trpc-group unlocked this conversation Jun 5, 2025
@hyprh
Copy link
Contributor Author

hyprh commented Jun 5, 2025

I have read the CLA Document and I hereby sign the CLA

@liuzengh liuzengh closed this Jun 5, 2025
@liuzengh liuzengh reopened this Jun 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2025
@trpc-group trpc-group unlocked this conversation Jun 5, 2025
@github-actions
Copy link

github-actions bot commented Jun 5, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@hyprh
Copy link
Contributor Author

hyprh commented Jun 5, 2025

I have read the CLA Document and I hereby sign the CLA

@hyprh hyprh changed the title merge v1.0.1: Merge made by the ort strategy merge internal tag v0.1.1: Merge made by the ort strategy Jun 6, 2025
@liuzengh liuzengh merged commit 2b5ae44 into trpc-group:main Jun 9, 2025
2 of 5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants