Goal: Enhance Neo.data.connection.WebSocket to be a proper Observable by firing events for all lifecycle stages and removing hardcoded console logs.
Requirements:
- Fire Events:
close: In onClose, fire close event with {event, reason, wasClean}.
error: In onError, fire error event with {error}.
message: In onMessage, fire message event with {data} (raw parsed JSON).
- Remove Logs: Remove the
console.log statements in onClose and onError.
- Maintain Compatibility: Ensure existing promise-based message handling (
mId) still works.
Goal: Enhance
Neo.data.connection.WebSocketto be a proper Observable by firing events for all lifecycle stages and removing hardcoded console logs.Requirements:
close: InonClose, firecloseevent with{event, reason, wasClean}.error: InonError, fireerrorevent with{error}.message: InonMessage, firemessageevent with{data}(raw parsed JSON).console.logstatements inonCloseandonError.mId) still works.