making interfaces consistent

This commit is contained in:
Ben Menking
2026-05-07 14:41:36 -04:00
parent d59f61d764
commit fb807f42c6
5 changed files with 127 additions and 61 deletions
+8 -4
View File
@@ -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
View File
@@ -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";