modified socket_dist.erl