theturtle32 / WebSocket-Node

A WebSocket Implementation for Node.JS (Draft -08 through the final RFC 6455)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

connection.on('message', ...) - where this event is emitted ?

mir1198yusuf opened this issue · comments

Can someone please point me to the source code where connection.on('message', ...), this event is emitted.
The accept function in the WebSocketRequest file returns WebSocketConnection type object, but there is no handler in that file.

Thanks in advance!

Believe it is in WebSocketConnection, separate emits for binary and text messages depending upon the opCode

WebSocketConnection.prototype.processFrame = function(frame) {

around line 511