an attempt trying to refactor Web.SocketIO.Type, still much a mess