Related: https://github.com/xaionaro/clsync/issues/31
Common code was been moved from control.c to socket.c