Server: Updated to websockets 0.8 and implemented send function from outside loop