Skip to content

Socket.io

einarhuseby edited this page Jun 8, 2023 · 1 revision

Import the socket service import { NlfSocketService } from 'app/services/socket/socket.service';

Instantiate constructor(private socketService:  NlfSocketService) {}

Then access the socket directly like:

this.socketService.socket.on('action', (message) => {

    switch (message.action) {
        case 'obsreg_e5x_finished_processing': {
            ...
        }
    }
}

Clone this wiki locally