http server in c

-1

Gelera would like to understand this line of code:

full code: link

if (strncmp(request, "GET ", 4) == 0) 
{

   ptr = request + 4;

 }

Why add + 4?

    
asked by anonymous 03.02.2016 / 21:17

1 answer

0

The interpreter discovered a GET followed by a space and "eats" those 4 characters from the buffer, repositioning the pointer 4 characters ahead to continue parsing with what comes next.

    
04.02.2016 / 05:44