Skip to content

Commit

Permalink
Update MsgQueue.php
Browse files Browse the repository at this point in the history
  • Loading branch information
tioncico authored Jan 7, 2019
1 parent 4a4c0cc commit 7b4df4b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions new/MsgQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ public function __construct($queue)
$this->queue = $queue;
}

public function pop($data, $type = 1)
public function push($data, $type = 1)
{
$result = msg_send($this->queue, $type, $data);
return $result;
}

public function push($type = 0,$flags = MSG_IPC_NOWAIT)
public function pop($type = 0,$flags = MSG_IPC_NOWAIT)
{
msg_receive($this->queue, $type, $message_type, 1024, $message,true,$flags);
// var_dump($message_type);
Expand All @@ -49,4 +49,4 @@ public static function getQueue($path_name, $prop = '1', $perms = '0666')
$data['queue'] = msg_get_queue($data['queue_key'], $perms);
return $data;
}
}
}

0 comments on commit 7b4df4b

Please sign in to comment.