diff options
| author | Nic Gaffney <gaffney_nic@protonmail.com> | 2023-09-06 14:05:17 -0500 |
|---|---|---|
| committer | Nic Gaffney <gaffney_nic@protonmail.com> | 2023-09-06 14:05:17 -0500 |
| commit | 7b67ab3d6fbc74c95f35b992286cb98492c8b433 (patch) | |
| tree | f72f431afaa17033a9651fbbc989bd7ec34813de /std | |
| parent | 739421c86f5fabfef5c765beea7741a7409976d7 (diff) | |
| download | sloth-7b67ab3d6fbc74c95f35b992286cb98492c8b433.tar.gz | |
restructured filetree
Diffstat (limited to 'std')
| -rw-r--r-- | std/stdsocket.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/std/stdsocket.c b/std/stdsocket.c index 94d2ebe..0a47f97 100644 --- a/std/stdsocket.c +++ b/std/stdsocket.c @@ -1,4 +1,3 @@ -#include "stdlib.c" #include <netinet/in.h> #include <stdbool.h> #include <stdio.h> @@ -66,6 +65,14 @@ char *recvsock(int soc) { return buf; } +size_t +strlen(const char *str) +{ + const char *s; + for (s = str; *s; ++s); + return(s - str); +} + void sendsock(char *msg, int soc) { send(soc, msg, strlen(msg), 0); } void closesock(int soc, bool server) { |
