Write to IO stream instead of STDOUT
Add basic socket server support, does not implement telnet
Update README with socket server details
Fix default telnet port
Refactor, improve reusability