socket io encapsulated