code: function onMessage(e)
      {
          if(e.data instanceof ArrayBuffer)
          {
              onArrayBuffer(e.data);
          }
          else
          {
              onStringMessage(e.data);
          }
      }
docs: server message callback, parses and invokes data by event type