workaround for using udp & tcp sockets