Skip to content

Commit

Permalink
Example: fix warnning
Browse files Browse the repository at this point in the history
  • Loading branch information
microcai committed Dec 25, 2024
1 parent df6ffec commit 1a48c41
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example/echo_server/echo_server_stackfull.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,11 @@ static void echo_sever_client_session(SOCKET client_sock)
//printf("* read operation completed\n");

char buf2[1024];
int content_length_line_len = snprintf(buf2, 80, "Content-Length: %d\r\n\r\n", ov.byte_transfered);
int content_length_line_len = snprintf(buf2, 80, "%d\r\n\r\n", (int) ov.byte_transfered);

WSABUF wsabuf[3] = {
{ .len = 17, .buf = (char*) "HTTP/1.1 200 OK\r\n" },
{ .len = (size_t) content_length_line_len, .buf = buf2 },
{ .len = 33, .buf = (char*) "HTTP/1.1 200 OK\r\nContent-Length: " },
{ .len = (ULONG) content_length_line_len, .buf = buf2 },
{ ov.byte_transfered, buf1 }
};

Expand Down

0 comments on commit 1a48c41

Please sign in to comment.