After initializing the Pusheo object, you can subscribe to a channel.
A channel can be any valid alphanumeric string. “lost_messages_call_interval” specifies the lost messages call interval. Pusheo automatically checks for lost messages and delivers them to you. You also need to specify callback functions at this stage as follows:
pusheo.subscribe({
channel: "12345",
lost_messages_call: true,
lost_messages_call_interval: 10000,
open: onOpen,
message: onMessage,
message_sent: onMessageSent,
close: onClose,
error: onError,
params: {
timeout: 300000,
transport: 'websocket',
fallbackTransport: 'long-polling',
maxRequest: 5000,
reconnect: true,
reconnectInterval: 5000
}
});