function createSession($userId, $sessionType, $callbackClient)
 {
     $msg = new CMessage();
     $msg->setName("CSS");
     $msg->serialUint32($userId);
     $msg->serialString($sessionType);
     $callbackClient->sendMessage($msg);
 }
Exemplo n.º 2
0
 function login($userId, $ipAddress, $domainId)
 {
     $msg = new CMessage();
     $msg->setName("LG");
     $msg->serialUint32($userId);
     $msg->serialString($ipAddress);
     $msg->serialUint32($domainId);
     return parent::sendMessage($msg);
 }
 function addJournalEntry($charId, $sessionId, $entryType, $text)
 {
     $msg = new CMessage();
     $msg->setName("AJE");
     $msg->serialUint32($charId);
     $msg->serialUint32($sessionId);
     $msg->serialString($entryType);
     $msg->serialString($text);
     return parent::sendMessage($msg);
 }
Exemplo n.º 4
0
 function getHighRezGraph($varAddr, $startDate, $endDate, $milliStep)
 {
     $msg = new CMessage();
     $msg->setName("GHRG");
     $msg->serialString($varAddr);
     $msg->serialUint32($startDate);
     $msg->serialUint32($endDate);
     $msg->serialUint32($milliStep);
     $ret = "";
     $ret = parent::sendMessage($msg);
     if ($ret == false) {
         // error during send
         $this->invokeError("getHighRezGraph", "Error in 'sendMessage'");
         return false;
     }
     $retMsg = parent::waitMessage();
     if ($ret == false) {
         // error during send
         $this->invokeError("getHighRezGraph", "Error in 'waitMessage'");
         return false;
     }
     if (!($retMsg->MsgName === "R_GHRG")) {
         // error during send
         $this->invokeError("getHighRezGraph", "Invalid response, awaited 'R_GHRG', received '" . $retMsg->MsgName . "'");
         return false;
     }
     // serial the return value
     $nbElem = 0;
     $retMsg->serialUInt32($nbElem);
     $retValue = array();
     for ($i = 0; $i < $nbElem; $i++) {
         $retMsg->serialString($item);
         $retValue[] = $item;
     }
     // return the return value
     return $retValue;
 }