Add function to `Socket.off`