The organelle wraps socketio server v0.9.x
{
"attachToChemical": String,
"port": Number,
"socketio": Object, /* optional */
"emit": {
"ready": String,
"connection": String,
"disconnection": String /* optional */
}
}
-
attachToChemical
is optional and indicates to start the socketio server once the organelle catches givenattachToChemical
chemical type. -
port
is used instead ifattachToChemical
is not provided to boot up standalone socketio server with buildin httpServer instance
Emitted with Chemical type value of dna.emit.ready
.
Chemical's structure:
{
"type": `dna.emit.ready`,
"data": SocketIOServer
}
Emitted with Chemical type value of dna.emit.connection
.
Chemical's structure:
{
"type": `dna.emit.connection`,
"socket": SocketIOConnection
}
Emitted with Chemical type value of dna.emit.disconnection
only if present.
Chemical's structure:
{
"type": `dna.emit.disconnection`,
"socket": SocketIOConnection
}
Closes underlaying socketioServer instance
Expected Chemical structure:
{
"data": HttpServer
}
- HttpServer
- the chemical is not aggregated