making interfaces consistent
This commit is contained in:
+4
-13
@@ -36,20 +36,11 @@ if( !$mc->connected($contact['pub_key']) ) {
|
||||
$req = base64_decode($contact['pub_key']) . chr(CoreProtocol::BINREQ_TELEMETRY);
|
||||
|
||||
$result = $mc->sendBinaryRequest($req);
|
||||
echo "Tag: {$result['tag']}\n";
|
||||
|
||||
$timeout = 0;
|
||||
echo "Tag: {$result->tag}\n";
|
||||
|
||||
while($timeout++ < 6) {
|
||||
echo "timeout: $timeout\n";
|
||||
$resp = $mc->getSyncNextMessage();
|
||||
if( !empty($resp) ) {
|
||||
print_r($resp);
|
||||
if( $resp['code'] == 0x8c) {
|
||||
exit;
|
||||
}
|
||||
}
|
||||
sleep(1);
|
||||
}
|
||||
$msg = $mc->pollForMessage($result->tag);
|
||||
|
||||
print_r($msg);
|
||||
|
||||
echo "Complete\n";
|
||||
|
||||
Reference in New Issue
Block a user