summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-11-27 12:23:26 +0100
committerOskar <[email protected]>2024-11-27 12:23:26 +0100
commita43dc3fcac6d6af0082edc73b0b148ca2c504c3a (patch)
tree52e7172fa1503a218eb9586c99aaf97fda5e5d82
parentef276e1e86e4a554141b511757dded2b1f1108fb (diff)
more
-rwxr-xr-xbin/bindingbin0 -> 16272 bytes
-rwxr-xr-xbin/clientbin0 -> 16888 bytes
-rwxr-xr-xbin/client-DGRAMbin0 -> 16808 bytes
-rwxr-xr-xbin/connectingbin0 -> 16176 bytes
-rwxr-xr-xbin/dumbclientbin0 -> 16328 bytes
-rwxr-xr-xbin/helloworldbin0 -> 16336 bytes
-rwxr-xr-xbin/listenbin0 -> 16880 bytes
-rwxr-xr-xbin/listen-DGRAMbin0 -> 16712 bytes
-rw-r--r--client.c6
-rw-r--r--polling.c25
-rwxr-xr-xtest/binding-tbin0 -> 30104 bytes
-rwxr-xr-xtest/client-DGRAM-tbin0 -> 37512 bytes
-rwxr-xr-xtest/client-tbin0 -> 38088 bytes
-rwxr-xr-xtest/connecting-tbin0 -> 29880 bytes
-rwxr-xr-xtest/dumbclient-tbin0 -> 31024 bytes
-rwxr-xr-xtest/helloworld-tbin0 -> 31288 bytes
-rwxr-xr-xtest/listen-DGRAM-tbin0 -> 37160 bytes
-rwxr-xr-xtest/listen-tbin0 -> 38864 bytes
18 files changed, 28 insertions, 3 deletions
diff --git a/bin/binding b/bin/binding
new file mode 100755
index 0000000..be7fffa
--- /dev/null
+++ b/bin/binding
Binary files differ
diff --git a/bin/client b/bin/client
new file mode 100755
index 0000000..d734cd7
--- /dev/null
+++ b/bin/client
Binary files differ
diff --git a/bin/client-DGRAM b/bin/client-DGRAM
new file mode 100755
index 0000000..2e9e02a
--- /dev/null
+++ b/bin/client-DGRAM
Binary files differ
diff --git a/bin/connecting b/bin/connecting
new file mode 100755
index 0000000..d38978f
--- /dev/null
+++ b/bin/connecting
Binary files differ
diff --git a/bin/dumbclient b/bin/dumbclient
new file mode 100755
index 0000000..c3c3f3f
--- /dev/null
+++ b/bin/dumbclient
Binary files differ
diff --git a/bin/helloworld b/bin/helloworld
new file mode 100755
index 0000000..25a4932
--- /dev/null
+++ b/bin/helloworld
Binary files differ
diff --git a/bin/listen b/bin/listen
new file mode 100755
index 0000000..0869f76
--- /dev/null
+++ b/bin/listen
Binary files differ
diff --git a/bin/listen-DGRAM b/bin/listen-DGRAM
new file mode 100755
index 0000000..d43ce2c
--- /dev/null
+++ b/bin/listen-DGRAM
Binary files differ
diff --git a/client.c b/client.c
index eac217c..1a240a1 100644
--- a/client.c
+++ b/client.c
@@ -20,12 +20,12 @@
int sockfd = -1;
size_t bytes_sent = 0;
-void talk_to_server (int sockfd) {
+void talk_to_server (int ttssockfd) {
fprintf(stdout, "Waiting to connect...\n");
int rcv_ret;
char buf_connected[11];
- rcv_ret = recv(sockfd, buf_connected, 11, 0);
+ rcv_ret = recv(ttssockfd, buf_connected, 11, 0);
buf_connected[rcv_ret] = '\0';
fprintf(stdout, "%s", buf_connected);
while (1) {
@@ -38,7 +38,7 @@ void talk_to_server (int sockfd) {
continue;
}
- bytes_sent = bytes_sent + send(sockfd, editbuffer, fgs_len, 0);
+ bytes_sent = bytes_sent + send(ttssockfd, editbuffer, fgs_len, 0);
}
}
diff --git a/polling.c b/polling.c
new file mode 100644
index 0000000..bce456e
--- /dev/null
+++ b/polling.c
@@ -0,0 +1,25 @@
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+#include <unistd.h>
+#include <stdbool.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <arpa/inet.h>
+#include <netinet/in.h>
+#include <signal.h>
+#include <poll.h>
+
+#define __FAIL EXIT_FAILURE
+#define BACKLOG 2
+#define __PORT "62000"
+#define BUF_SZ_2 2048
+
+int main () {
+
+
+
+}
diff --git a/test/binding-t b/test/binding-t
new file mode 100755
index 0000000..5352fec
--- /dev/null
+++ b/test/binding-t
Binary files differ
diff --git a/test/client-DGRAM-t b/test/client-DGRAM-t
new file mode 100755
index 0000000..8329741
--- /dev/null
+++ b/test/client-DGRAM-t
Binary files differ
diff --git a/test/client-t b/test/client-t
new file mode 100755
index 0000000..7e519aa
--- /dev/null
+++ b/test/client-t
Binary files differ
diff --git a/test/connecting-t b/test/connecting-t
new file mode 100755
index 0000000..e4628f7
--- /dev/null
+++ b/test/connecting-t
Binary files differ
diff --git a/test/dumbclient-t b/test/dumbclient-t
new file mode 100755
index 0000000..e320f44
--- /dev/null
+++ b/test/dumbclient-t
Binary files differ
diff --git a/test/helloworld-t b/test/helloworld-t
new file mode 100755
index 0000000..e2cfd3d
--- /dev/null
+++ b/test/helloworld-t
Binary files differ
diff --git a/test/listen-DGRAM-t b/test/listen-DGRAM-t
new file mode 100755
index 0000000..d28e6c4
--- /dev/null
+++ b/test/listen-DGRAM-t
Binary files differ
diff --git a/test/listen-t b/test/listen-t
new file mode 100755
index 0000000..6bd5551
--- /dev/null
+++ b/test/listen-t
Binary files differ