Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jun 30, 2024
1 parent 183e64d commit 7ccacbf
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions plugin/YPTSocket/test.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,17 @@ function _test_send($SocketURL, $msg) {
global $SocketSendObj;
$conn->on('message', function($msg) use ($conn, $_count) {
global $responses;
$json = _json_decode($msg->getPayload());
$payload = $msg->getPayload();
$json = _json_decode($payload);
//var_dump($json);
$parts = explode(':', $json->msg->test_msg);
$c = new AVideoSocketConfiguration($parts[0], $parts[2], $parts[1], true);
$responses[] = $c;
$c->log();
if(!empty($json->msg) && !is_object($json->msg)){
$parts = explode(':', $json->msg->test_msg);
$c = new AVideoSocketConfiguration($parts[0], $parts[2], $parts[1], true);
$responses[] = $c;
$c->log();
}else{
$responses[] = "Could not decode response {$payload}";
}
printIfComplete();
});

Expand Down

0 comments on commit 7ccacbf

Please sign in to comment.