In node.js I’d like to create a client that:
- open a socket to “server1”
- through this socket: send info (array of bytes) to “server1” (this will activate a module on server side that will send data to client on irregular basis)
- read data sent by “server1”
Can I only use a socket that is created when my client startup and then wait for data from server1 or do I need to implement a server instead ?
Just create a TCP connection to your server. Then just do stuff with it.