fixed some invalid pointer conversions to be able to compile with C++ compiler
added transport protocol implementation (no transport and no error handling yet)