Added TSocket methods, some error handling, replaced host parameter with String