aboutsummaryrefslogtreecommitdiff
path: root/apiosend.c
diff options
context:
space:
mode:
authorubq323 <ubq323@ubq323.website>2022-10-31 18:43:41 +0000
committerubq323 <ubq323@ubq323.website>2022-10-31 18:43:41 +0000
commit1dc90feaf9d7db3c0e5d8233a5d60c46ee236c1c (patch)
treee6875ee126597c278eb4a0c09a027e04fec3930d /apiosend.c
parentcb2327d8e42c8d52d3e5dc8dd8132cb2c0933c70 (diff)
remove apiosend, since it turns out nc is fast enough to do that anyway
Diffstat (limited to 'apiosend.c')
-rw-r--r--apiosend.c37
1 files changed, 0 insertions, 37 deletions
diff --git a/apiosend.c b/apiosend.c
deleted file mode 100644
index 0a98be0..0000000
--- a/apiosend.c
+++ /dev/null
@@ -1,37 +0,0 @@
-#include <sys/types.h>
-#include <stdio.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-
-#define MAXLEN 480
-
-int main() {
- int sock;
- if ((sock = socket(AF_UNIX,SOCK_DGRAM,0)) == -1) {
- perror("socket");
- return 1;
- }
-
- printf("%d\n",EOF);
-
- struct sockaddr_un addr;
- memset(&addr, 0, sizeof addr);
- addr.sun_family = AF_UNIX;
- strncpy(addr.sun_path, "bees.sock", 10);
-
- printf("%ld\n",sizeof addr.sun_path);
-
- char buf[MAXLEN];
- int i;
- char c;
- for (i = 0; i < MAXLEN && (c = getchar())!=EOF; i++)
- buf[i] = c;
-
- sendto(sock, buf, i, 0, (struct sockaddr *)&addr, sizeof addr);
- printf("%ld %ld\n",sizeof addr,sizeof (struct sockaddr_un));
-
- return 0;
-}
-
-
-