making webcontroller working with sockets