    }
    
    public onMessage(callback: (Message) => void) {
        this._msgCallback = callback;
    }
        
    public close(): void {
        if(this._sock != null) {
            this._sock.close();
        }
    }
    