code: function(params) {
          var data = {
            type: params.type
          };
  
          if (params.trackerId) {
            data.trackerId = params.trackerId;
          }
  
          sendPingTimeout && clearTimeout(sendPingTimeout);
          sendPingTimeout = setTimeout(function() {
            ping();
          }, connectionCheckTimeout);
  
          try {
            if (params.content) {
              data.content = JSON.stringify(params.content);
            }
  
            if (socket.readyState === 1) {
              socket.send(JSON.stringify(data));
            }
          } catch (error) {
            eventCallback["customError"]({
              errorCode: 4004,
              errorMessage: "Error in Socket sendData!",
              errorEvent: error
            });
          }
        }
docs: *****************************************************
  P R I V A T E   M E T H O D S            *
  *****************************************************