Add CodeNotImplemented error constant (HTTP 501) for planned but unavailable features. Refactor WebSocket packet handling from JSON to binary protocol for improved efficiency: New packet structure: - PacketTypeSuccess (0x00): [type:1][json_data:var] - PacketTypeError (0x01): [type:1][code_len:1][code:var][msg_len:2][msg:var][details_len:2][details:var] - PacketTypeData (0x02): Reserved for future use Update SendErrorPacket: - Build binary error packets with length-prefixed fields - Use WriteMessage with websocket.BinaryMessage Update SendSuccessPacket: - Marshal data to JSON then wrap in binary packet - Eliminates "success" wrapper field for cleaner protocol Add helper functions: - NewNotImplemented(feature) - Standard 501 error - NewNotImplementedWithIssue(feature, issueURL) - 501 with GitHub reference |
||
|---|---|---|
| .. | ||
| errors.go | ||