-1
Gelera would like to understand this line of code:
complete code: https://dzone.com/articles/web-server-c
if (strncmp(request, "GET ", 4) == 0)
{
ptr = request + 4;
}
Why add + 4 ?
-1
Gelera would like to understand this line of code:
complete code: https://dzone.com/articles/web-server-c
if (strncmp(request, "GET ", 4) == 0)
{
ptr = request + 4;
}
Why add + 4 ?
0
The interpreter discovered a GET followed by a space and "eats" these 4 buffer characters, repositioning the pointer 4 characters ahead, to continue the parse with what follows.
Browser other questions tagged c
You are not signed in. Login or sign up in order to post.
4 == number of bytes in
"GET "
– carlosfigueira