Mercurial
view seobeo/seobeo.h @ 3:2758f5527d2b
[Seobeo] Working on simple TCP server and client logic.
| author | June Park <parkjune1995@gmail.com> |
|---|---|
| date | Wed, 24 Sep 2025 18:49:09 -0700 |
| parents | adcfad6e86fb |
| children | 0b3b4f5887bb |
line wrap: on
line source
#ifndef SEOBEO_SERVER_H #define SEOBEO_SERVER_H // --- Seobeo --- // // Library for creating sockets, binding sockets, and listening to a sockets. // Sending and unpacking bytes of data. #include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <arpa/inet.h> #include <sys/wait.h> #include <signal.h> #include <fcntl.h> #include "dowa/dowa.h" // --- Internal? --- // extern int Seobeo_CreateSocket(int32 stream, char* port, int32 backlog); extern void Seobeo_ListenClient(int sock_fd, void (*handle_client)(int)); extern void *Seobeo_GetIP4OrIP6(struct sockaddr *sa); // --- TCP --- // // extern int Seobeo_TCP_SocketCreate(char* port, int32 backlog) #endif