- added function to read/write a string to the socket
- further bugfixes