adapt changes to tcp-socket