winnie-http/webserver.c

16 lines
295 B
C
Raw Normal View History

2024-05-14 18:34:20 +07:00
#include <arpa/inet.h>
#include <errno.h>
#include <stdio.h>
#include <sys/socket.h>
int main() {
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
if(sockfd == -1) {
perror("webserve (socket)");
return 1;
}
printf("socket created successfully\n");
return 0;
}