Fix WebSocket server assignment and expand arrayBufferToString to loop.