Created
November 15, 2012 20:47
-
-
Save jsor/4081153 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace React\Stomp; | |
class Acknowledgement | |
{ | |
private $client; | |
private $messageId; | |
private $subscriptionId; | |
public function __construct($client, $messageId, $messageId) | |
{ | |
} | |
public function ack() | |
{ | |
} | |
public function nack() | |
{ | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$client->subscribe('/topic/foo', function ($frame, $acknowledgement) { | |
if ($problem) { | |
$acknowledgement->nack(); | |
} else { | |
$acknowledgement->ack(); | |
} | |
}, 'client'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment