Working implementation of socket io