18 lines
348 B
C++
18 lines
348 B
C++
#include <stdio.h>
|
|
#include <string.h>
|
|
|
|
#include "gquic.h"
|
|
#include "gquic_process.h"
|
|
|
|
int quic_version_int2string(unsigned int version, char *buff, int buff_len)
|
|
{
|
|
if(version>0 && version<=GQUIC_VERSION_Q099)
|
|
{
|
|
snprintf(buff, buff_len, "Google QUIC %02d", (((version>>8)&0x0000000F)*10) + (version&0x0000000F));
|
|
return 0;
|
|
}
|
|
|
|
return -1;
|
|
}
|
|
|