add client testing

This commit is contained in:
2024-11-08 22:19:47 +01:00
parent 7f186ff44b
commit f13426283e
10 changed files with 156 additions and 28 deletions

16
include/client.h Normal file
View File

@@ -0,0 +1,16 @@
#ifndef __CLIENT_H__
#define __CLIENT_H__
#include <arpa/inet.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int test_client_connection(const char *hostname, const char *port);
#endif

View File

@@ -15,6 +15,6 @@
// how many pending connections the queue will hold
#define BACKLOG 10
int start_server(void);
int start_server(const char *hostname, const char *service);
#endif

View File

@@ -11,7 +11,7 @@
#include <stdlib.h>
#include <string.h>
// Print every IPs of a hostname
// print every IPs of a hostname
void print_ips(const char *hostname, const char *port);
#endif