integrating sockets with views