View Code? Open in Web Editor
NEW
A simple http webserver in C - inspired by IBM
simple-webserver's Introduction
Current:
Past:
- @PlayStation
- Worked on both PS4 and PS5, spanning different system UI apps and social experiences like PS+, Game Help, Profiles, and more
- Commonly used languages:
- Javascript (Ember / React)
- C++
- C#
- @Watsi
- Worked on building and expanding our donations platform
- Commonly used languages:
- Ruby (RoR)
- Javascript (Backbone)
- @Twilio
- Worked on the web and dev portals
- Commonly used languages:
simple-webserver's People
Contributors
simple-webserver's Issues
root@vodri:/mycpp/simple-webserver# make
gcc server.c -o server
server.c:49:6: warning: conflicting types for built-in function 'log'; expected 'double(double)' [-Wbuiltin-declaration-mismatch]
49 | void log(int type, char *s1, char *s2, int num)
| ^~~
server.c:20:1: note: 'log' is declared in header '<math.h>'
19 | #include <arpa/inet.h>
+++ |+#include <math.h>
20 |
server.c: In function 'main':
server.c:193:65: warning: passing argument 3 of 'accept' from incompatible pointer type [-Wincompatible-pointer-types]
193 | if((socketfd = accept(listenfd, (struct sockaddr *)&cli_addr, &length)) < 0)
| ^~~~~~~
| |
| size_t * {aka long unsigned int *}
In file included from server.c:17:
/usr/include/x86_64-linux-gnu/sys/socket.h:233:28: note: expected 'socklen_t * restrict' {aka 'unsigned int * restrict'} but argument is of type 'size_t *' {aka 'long unsigned int *'}
233 | socklen_t *__restrict __addr_len);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~
root@vodri:/mycpp/simple-webserver#