adapted test_log.cpp
added tcp (no impl yet)