protoo
protoo copied to clipboard
right way handle error for sendUTF method
Title: Improved Message Sending Handling in WebSocketTransport
Description: The purpose of this pull request is to enhance the reliability and error handling of the send method in the WebSocketTransport class. The changes include making the send method return a promise, allowing the calling code more flexibility in managing the sending process and appropriately responding to different outcomes of the operation.
Key Changes:
- The send method now returns a promise, enabling the handling of success or error events of the sending process.
- Additional error handling and logging logic has been introduced, increasing the ease of debugging and monitoring.
These changes make the send method more robust and predictable in use, especially in scenarios that require confirmation of message delivery.
I request the review and approval of these changes as they improve the functionality and reliability of the WebSocketTransport.