move copydata into socket.c
add copyfile implementation
add a ycm config