コード例 #1
0
 /**
  * Build
  *
  * @return Packet
  */
 public function build()
 {
     $header = new Header();
     $body = new ReplyBody();
     $packet = new Packet($header, $body);
     $packet->setSecret($this->secret);
     return $packet;
 }
コード例 #2
0
 /**
  * Build
  *
  * @return Packet
  */
 public function build()
 {
     $body = new StartBody();
     $body->setUser($this->username);
     $body->setPort($this->port);
     $body->setRemoteAddress($this->remoteAddress);
     $body->setData($this->password);
     $header = new Header();
     $header->setVersion(TAC_PLUS_VER_ONE);
     $header->setSequenceNumber($this->sequenceNumber);
     $header->setSessionId($this->sessionId);
     $packet = new Packet($header, $body);
     $packet->setSecret($this->secret);
     return $packet;
 }