making interfaces consistent
This commit is contained in:
@@ -24,10 +24,14 @@ $contact = $contacts[$choice - 1];
|
||||
|
||||
echo "Using {$contact['contact_name']}\n";
|
||||
|
||||
print_r($mc->login($contact['pub_key'], ''));
|
||||
print_r($mc->login($contact['pub_key'], readline('Please enter the password: ')));
|
||||
|
||||
$ts = $mc->statusRequest($contact['pub_key']);
|
||||
$result = $mc->statusRequest($contact['pub_key']);
|
||||
print_r($result);
|
||||
exit;
|
||||
|
||||
print_r($ts);
|
||||
$msg = $mc->pollForMessage($result->tag);
|
||||
|
||||
$mc->poll();
|
||||
print_r($msg);
|
||||
|
||||
echo "Complete\n";
|
||||
|
||||
+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