implements wokring sockets in battle view