This is an auxiliary class meant to simplify network access functionality.
For a real world application, see this other e-mail validation class which uses this socket class to communicate with MX SMTP servers in order to validate e-mail addresses:
jsclasses.org/package/17-JavaScript
...