Skip to content

Instantly share code, notes, and snippets.

View Yggdrasill501's full-sized avatar
🍇
Focusing

Filip Žitný Yggdrasill501

🍇
Focusing
View GitHub Profile
zig-cache/
zig-out/
/release/
/debug/
/build/
/build-*/
/docgen_tmp/
.DS_Store
#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define int long long // work with 64bit target
int token;
int *text, *old_text, *stack;
char *data;
@Yggdrasill501
Yggdrasill501 / socket.c
Created February 3, 2024 20:47
Simplest web socket for creating web-server in C
#include <string.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <unistd.h>
int main() {
int server_fd, new_socket;
struct sockaddr_in address;
int addrlen = sizeof(address);
char buffer[1024] = {0};