QUIC protocol [closed]

Hi all, i have a simple website hosted on a Server. I'm using QUIC as protocol and everything seems fine:

https://ibb.co/qywqQkC

Now,i wrote a simple script on the client that just keep sending packets to the host using php, but in wiresharks those packets are sent though UDP instead of QUIC.

Any suggestion on how to change and actually use QUIC?

https://ibb.co/J78B3zw

This is the script on the client

$server = 'X.X.X.X';
$port = 443;


$controllerSensors = new ControllerSensors();
$controllerSensors->createSensor("Sensore Bologna", "Temperatura", $server, $port, 1);
$controllerSensors->createSensor("Sensore Modena", "Temperatura", $server, $port,4);
$controllerSensors->createSensor("Sensore Reggio", "Umidità", $server, $port,8);
$controllerSensors->runAllSensors();

Run All Sensons script:

            if(!($this->socket = socket_create(AF_INET, SOCK_DGRAM, 0))){
                $errorcode = socket_last_error();
                $errormsg = socket_strerror($errorcode);
                die("Couldn't create socket: [$errorcode] $errormsg \n");
            }
          if( ! socket_sendto($this->socket, $input , strlen($input) , 0 , $this->ip , $this->port)){
                $errorcode = socket_last_error();
                $errormsg = socket_strerror($errorcode);
                die("Could not send data: [$errorcode] $errormsg \n");
            }

And finally the server script:

$ip = "0.0.0.0";
$port = "443";

error_reporting(~E_WARNING);
if(!($sock = socket_create(AF_INET, SOCK_DGRAM, 0))){
    $errorcode = socket_last_error();
    $errormsg = socket_strerror($errorcode);
    die("Couldn't create socket: [$errorcode] $errormsg \n");
}

// Bind the source address
if( !socket_bind($sock, $ip , $port) ){
    $errorcode = socket_last_error();
    $errormsg = socket_strerror($errorcode);
    die("Could not bind socket : [$errorcode] $errormsg \n");
}

while(true){
    $messageRecieved = "";
    $r = socket_recvfrom($sock, $messageRecieved, 512, 0, $remote_ip, $remote_port);        
    echo $messageRecieved . "<br>";
}

Shouldn't this script use QUIC for the data sent instead of UDP since the website is using QUIC? Thanks, Davide.

Fanto88's avatar
1
Fanto88
asked 2018-12-12 20:50:14 +0000
edit flag offensive 0 remove flag reopen merge delete

Closed for the following reason "question is off-topic or not relevant" by grahamb 2018-12-13 10:36:07 +0000

Comments

This is not a Wireshark question, so is off-topic for this site. You should ask your question on a PHP related site or forum.

grahamb's avatar grahamb (2018-12-13 10:36:00 +0000) edit

Because you are using UDP 443 and it is used by QUIC (HTTP/3)

Alexis La Goutte's avatar Alexis La Goutte (2020-01-02 06:42:21 +0000) edit
add a comment see more comments