Communication problems between php and cPP socket

now the project wants to monitor the identification result of a software and use socket to communicate with the software, but it is found that the result cannot be received and read circularly all the time. Do you have any good solutions?

    $socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
    //
    if(socket_connect($socket,"192.168.31.83",5266) == false){
        echo "connect fail massege:".socket_strerror(socket_last_error());
    }else{
            echo "client write success".PHP_EOL;
            //
            while($callback = socket_read($socket,32768,PHP_BINARY_READ)){
                //socket_getpeername($new_socket, $addr, $port);
                echo "server return message is:".PHP_EOL.$callback;
            }
    }
    socket_close($socket);//
Sep.01,2021

exit the while loop


to make sure that data is returned from the server.

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b32ba7-2b68c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b32ba7-2b68c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?