1.
Socket.io uses heartbeat mechanism to:
Select one:
a. Network delay detection
b. Messages delivery detection
c. New connection detection
d. Disconnection detection
2.
What datatype can Socket.io emit?
Select one:
a. number
b. Any serializable data structures can be emitted.
c. objects
d. strings
3.
io.sockets.emit("anotherEventName", data);
With respect to the statement above which is excerpted from the server side, the data will be delivered to:
Select one:
a. to a group of clients
b. new connections only
c. Single client
d. all the clients currently connected to the server
4.
To emit a message to all clients except sender, the server has to use:
Select one:
a. socket.broadcast.emit()
b. io.sockets.broadcast.emit()
c. sockets.emit()
d. socket.to('clients').emit()
5.
Set the environment variable GOOGLE_APPLICATION_CREDENTIALS to the file path of the JSON file that contains your service account key.
What does the service account key contain?
Select one:
a. Account user name and email only
b. account public key
c. account unique ID only
d. account private key
1) Disconnection detection
A heartbeat component is actualized at the Engine.IO level, permitting both the server and the client to know when the other one isn't reacting anymore.
2)Objects
Ready to send any serialisable question to and from the server. This incorporates strings, numbers, clusters and booleans. Able to too send Hub. js Buffer objects beginning with Socket.io 1.0.
3)all the clients currently connected to the server
socket.emit(); send to all the connected clients with the server at that time
4)socket.broadcast.emit()
this is the right one syntax to perform this send to all client except sender
5)account unique ID only
it give the authientication to connect with google api
Get Answers For Free
Most questions answered within 1 hours.