novosga/websocket-server

v2.0.1 2019-04-03 22:43 UTC

This package is auto-updated.

Last update: 2024-10-07 02:17:56 UTC


README

Novo SGA websocket events server writted in PHP compatible since v2.0.

Events

Client-to-server

register client

Panel Client register.

(No event data)

register user [user-only]

User Client register

Event data for User:

{
    "unity": integer,
    "secret": string
}

Event data for Panel:

{
    "unity": integer,
    "services": array
}

new ticket

User Client on triagem or redirecting on attendance

Event data:

{
    "unity": integer
}

change ticket [user-only]

User Client on monitor emitted when cancel or transfer ticket

Event data:

{
    "unity": integer
}

call ticket [user-only]

User Client on attendance

Event data:

{
    "unity": integer,
    "service": integer,
    "hash": string
}

client update

Client info update

Event data for User:

{
    "unity": int
}

Event data for Panel:

{
    "unity": integer,
    "services": array
}

Server-to-client

register ok

(No event data)

update queue [user-only]

Emmited when: new ticket, change ticket, call ticket.

(No event data)

call ticket [panel-only]

Emmited when: call ticket.

Event data for Panel:

{
    "unity": integer,
    "service": integer,
    hash: string
}