Some possible methods you could add:
- include a method to set the timeout for receiving data,
- a method to set the size of the receive buffer,
- or a method to set the IP address and port of the server to connect to.
- add ipv6 support
- add encrpytion
- add logging
- change error handling to throw socket with error code so the appliction can decide how to handle the error