You want to access a service provided over the network.
Create a basic TCP client.
Accessing the Basic Server:
The most important work takes place in the connection.on ‘data’ handler, where the client receives its response from the server and would most likely arrange for responses to it.
See also the Basic Server, Bi-Directional Client, and Bi-Directional Server recipes.
- Add support for choosing the target domain and port based on command-line arguments or from a configuration file.