diff options
author | Oskar <[email protected]> | 2024-11-27 12:23:26 +0100 |
---|---|---|
committer | Oskar <[email protected]> | 2024-11-27 12:23:26 +0100 |
commit | a43dc3fcac6d6af0082edc73b0b148ca2c504c3a (patch) | |
tree | 52e7172fa1503a218eb9586c99aaf97fda5e5d82 | |
parent | ef276e1e86e4a554141b511757dded2b1f1108fb (diff) |
more
-rwxr-xr-x | bin/binding | bin | 0 -> 16272 bytes | |||
-rwxr-xr-x | bin/client | bin | 0 -> 16888 bytes | |||
-rwxr-xr-x | bin/client-DGRAM | bin | 0 -> 16808 bytes | |||
-rwxr-xr-x | bin/connecting | bin | 0 -> 16176 bytes | |||
-rwxr-xr-x | bin/dumbclient | bin | 0 -> 16328 bytes | |||
-rwxr-xr-x | bin/helloworld | bin | 0 -> 16336 bytes | |||
-rwxr-xr-x | bin/listen | bin | 0 -> 16880 bytes | |||
-rwxr-xr-x | bin/listen-DGRAM | bin | 0 -> 16712 bytes | |||
-rw-r--r-- | client.c | 6 | ||||
-rw-r--r-- | polling.c | 25 | ||||
-rwxr-xr-x | test/binding-t | bin | 0 -> 30104 bytes | |||
-rwxr-xr-x | test/client-DGRAM-t | bin | 0 -> 37512 bytes | |||
-rwxr-xr-x | test/client-t | bin | 0 -> 38088 bytes | |||
-rwxr-xr-x | test/connecting-t | bin | 0 -> 29880 bytes | |||
-rwxr-xr-x | test/dumbclient-t | bin | 0 -> 31024 bytes | |||
-rwxr-xr-x | test/helloworld-t | bin | 0 -> 31288 bytes | |||
-rwxr-xr-x | test/listen-DGRAM-t | bin | 0 -> 37160 bytes | |||
-rwxr-xr-x | test/listen-t | bin | 0 -> 38864 bytes |
18 files changed, 28 insertions, 3 deletions
diff --git a/bin/binding b/bin/binding Binary files differnew file mode 100755 index 0000000..be7fffa --- /dev/null +++ b/bin/binding diff --git a/bin/client b/bin/client Binary files differnew file mode 100755 index 0000000..d734cd7 --- /dev/null +++ b/bin/client diff --git a/bin/client-DGRAM b/bin/client-DGRAM Binary files differnew file mode 100755 index 0000000..2e9e02a --- /dev/null +++ b/bin/client-DGRAM diff --git a/bin/connecting b/bin/connecting Binary files differnew file mode 100755 index 0000000..d38978f --- /dev/null +++ b/bin/connecting diff --git a/bin/dumbclient b/bin/dumbclient Binary files differnew file mode 100755 index 0000000..c3c3f3f --- /dev/null +++ b/bin/dumbclient diff --git a/bin/helloworld b/bin/helloworld Binary files differnew file mode 100755 index 0000000..25a4932 --- /dev/null +++ b/bin/helloworld diff --git a/bin/listen b/bin/listen Binary files differnew file mode 100755 index 0000000..0869f76 --- /dev/null +++ b/bin/listen diff --git a/bin/listen-DGRAM b/bin/listen-DGRAM Binary files differnew file mode 100755 index 0000000..d43ce2c --- /dev/null +++ b/bin/listen-DGRAM @@ -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 Binary files differnew file mode 100755 index 0000000..5352fec --- /dev/null +++ b/test/binding-t diff --git a/test/client-DGRAM-t b/test/client-DGRAM-t Binary files differnew file mode 100755 index 0000000..8329741 --- /dev/null +++ b/test/client-DGRAM-t diff --git a/test/client-t b/test/client-t Binary files differnew file mode 100755 index 0000000..7e519aa --- /dev/null +++ b/test/client-t diff --git a/test/connecting-t b/test/connecting-t Binary files differnew file mode 100755 index 0000000..e4628f7 --- /dev/null +++ b/test/connecting-t diff --git a/test/dumbclient-t b/test/dumbclient-t Binary files differnew file mode 100755 index 0000000..e320f44 --- /dev/null +++ b/test/dumbclient-t diff --git a/test/helloworld-t b/test/helloworld-t Binary files differnew file mode 100755 index 0000000..e2cfd3d --- /dev/null +++ b/test/helloworld-t diff --git a/test/listen-DGRAM-t b/test/listen-DGRAM-t Binary files differnew file mode 100755 index 0000000..d28e6c4 --- /dev/null +++ b/test/listen-DGRAM-t diff --git a/test/listen-t b/test/listen-t Binary files differnew file mode 100755 index 0000000..6bd5551 --- /dev/null +++ b/test/listen-t |