TCP and UDP servers and its clients
Get and install the code on both server and client:
git clone https://github.com/geerdkakes/ServerSocketTCP_UDP.git
cd ServerSocketTCP_UDP
npm install
node udp_server.js
Default the server listenes on port 21000. This can be adjusted by changing the config file: config/config.json
node udp_client.js -h <dest_address> -c <client_name> -p 21000 -s <size>
where:
-h
is the destination host (probably a server on the network)-c
is the client name from which you are running the test-p
is the port number the server is listening on. Default on 21000-s
is the packet size. Default (and minumum) is 149 bytes. This includes the udp header and corresponds to a payload of 117 bytes.-i
interval between packets in msec, default 1 second-t
time duration in seconds, default no limit
kubectl apply -f deployment-udp-server.yaml
Please note the kubernetes service and ingress is created for an Ericsson ECCD cluster and differs from a regular config. Changing the service to use a nodeport will do the trick.
NodeJS 8 or above
## Acknowledgments
* This is a fork from: https://github.com/rodrigoms2004/ServerSocketTCP_UDP.git
* [sid24rane](https://gist.github.com/sid24rane) - Git Hub from sid24rane
* [UDP Server and Client](https://gist.github.com/sid24rane/6e6698e93360f2694e310dd347a2e2eb) - Original UDP server and client
## License
Copyfree