aboutsummaryrefslogtreecommitdiff
path: root/protocol.h
diff options
context:
space:
mode:
authorsotech117 <michael_foiani@brown.edu>2023-09-25 22:21:42 -0400
committersotech117 <michael_foiani@brown.edu>2023-09-25 22:21:42 -0400
commit6a2c567b85be275bb431c09952a88ea4cdf210aa (patch)
treeff649ae093b3b8eb9931e3a2e4cf7bb3e5ce0bb7 /protocol.h
parent8c6ae1ecde9faa0af5dacaf7ecf0f9cf47b69159 (diff)
massive restrcuting of code for readability
Diffstat (limited to 'protocol.h')
-rw-r--r--protocol.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/protocol.h b/protocol.h
index fc5b536..7970e18 100644
--- a/protocol.h
+++ b/protocol.h
@@ -11,6 +11,8 @@
#define STATIONSHUTDOWN 7
#define NEWSTATION 8
+#define TCP_TIMEOUT 100000 // 100ms in microseconds
+#define MAX_PACKET_SIZE 512
// client to server messages (commands)
@@ -63,3 +65,4 @@ struct NewStation {
int send_all(int sock, char *buf, int *len);
int recv_all(int sock, char *buf, int *len);
+void *get_in_addr(struct sockaddr *sa);