code: function(msg) {
          if (onSendLogging)
            asyncLogger("Send", msg);
  
          switch (protocol) {
            case 'websocket':
              if (socketState === socketStateType.OPEN) {
                socket.emit(msg);
              } else {
                pushSendDataQueue.push(msg);
              }
              break;
  
            case 'queue':
              if (socketState === socketStateType.OPEN) {
                activemq.sendMessage({
                  destination: params.queueSend,
                  message: msg
                });
              } else {
                pushSendDataQueue.push(msg);
              }
              break;
          }
        }
docs: *****************************************************
  P R I V A T E   M E T H O D S            *
  *****************************************************