Sending Data

Once the connection is established if the token has the right permission you can send data to the cloud in real-time

Insert

Let's consider a machine subscriber type

socket.emit(
'insert',
{
destination: 'demo_table',
data: [
{
id: 'testing',
sub_id: 'heavy load',
start: true,
temperature: 42.8,
message: 'sending data in real-time'
},
],
},
response => {
/**
* { success: true }
* or
* {
* code: <error code>,
* success: false,
* message: <error message>
* }
*/
},
)