Commit Graph

208 Commits

Author SHA1 Message Date
8401f74922 Define WIN32_LEAN_AND_MEAN to avoid including windows.h, when including winsock2.h 2024-03-13 15:10:16 -05:00
d2dd95b7cc Replaced global_args with project_args to prevent build error on MinGW 2024-03-13 15:09:48 -05:00
5cf11ac014 Added stdint header file 2024-03-13 14:36:24 -05:00
0dbf8936fd Added a #define for math constants on MinGW 2024-03-13 14:36:10 -05:00
3ab97b3853 Compile the application if it isn't already compiled 2024-03-13 13:00:28 -05:00
aea8f3dfd2 Updated TODO 2024-03-12 10:05:39 -05:00
94e08f3863 Used blocking recv here, to ensure that we wait for the server to respond 2024-03-12 10:02:53 -05:00
a847da5339 Added support for printing out the peer's IPv6 address; replaced struct sockaddr with struct sockaddr_storage 2024-03-12 10:02:23 -05:00
550643281e Replace all instances of sockaddr with sockaddr_storage 2024-03-12 09:44:41 -05:00
ef869710e5 Replaced recvAll call with recvAllNB 2024-03-12 09:44:15 -05:00
00d20ebc88 Used the non-blocking recv function, to ensure that the game doesn't hang if the server doesn't respond. 2024-03-12 09:43:48 -05:00
839efc3c44 Replaced all instances of struct sockaddr with struct sockaddr_storage, since it can fit v6 addresses as well. Cast values accordingly. 2024-03-12 09:43:16 -05:00
0a1934fdf9 Updated TODO 2024-03-12 09:42:32 -05:00
24b2a83044 Used a sockaddr_storage struct instead of a sockaddr struct, since the latter is not big enough for IPv6 2024-03-12 00:25:41 -05:00
7d4fd929c7 Updated TODO 2024-03-12 00:25:11 -05:00
54f7dbe7ee Modified recvAllNB() to return an empty string (instead of NULL) if there is nothing to read 2024-03-12 00:13:56 -05:00
06f44d385d Allow user to quit in menu screen; better error handling.
I set up a try-catch to catch the exception thrown by the Server/Client when
it can't create a socket. I also used display_and_exit() to
automatically close the window after the text has been displayed.
2024-03-11 13:45:05 -05:00
6f292699f8 Updated header file to reflect new function 2024-03-11 13:19:07 -05:00
6a40a596c1 Added new function to display text then exit 2024-03-11 13:18:48 -05:00
fc59a7221b Removed unnecessary #include 2024-03-11 13:18:31 -05:00
7f0898c81e Updated TODO 2024-03-11 13:17:18 -05:00
4001135451 Integrated upstream changes, since I forgot to pull before making local changes. 2024-03-11 01:32:56 -05:00
66d7585297 Removed IP version checking code (since this is handled in the Sock constructor), and allowed server (but not client, yet) to quit game before round start 2024-03-11 01:29:56 -05:00
727aeafdb9 Updated Server and Client constructor calls 2024-03-11 01:28:35 -05:00
3bdfdb114c Updated TODO 2024-03-11 01:28:04 -05:00
f840ff9c00 Updated comment explaining function 2024-03-10 21:57:58 -05:00
986e386098 Updated Server and Client constructor calls, so that they don't pass in the IP version 2024-03-10 21:56:03 -05:00
53282727ec Removed testing code 2024-03-10 21:55:09 -05:00
d43dc41f25 Updated TODO 2024-03-10 21:54:47 -05:00
0058e7e411 Removed ip_ver parameter
I removed this because I realized I could just check the IP version inside
the constructor. The Sock constructor now checks the address passed to it.
Like before, if the address is neither v4 nor v6, an exception is thrown.
Since the Server and Client constructors call the Sock constructor, no change
was required in these files, except passing the right number of parameters.
2024-03-10 21:53:06 -05:00
764f343f5d Updated TODO 2024-03-10 19:27:46 -05:00
cdd1db6808 Implemented IPv6 address decoding algorithm 2024-03-10 19:27:17 -05:00
ae044c1905 Convert character to upper-case before converting to decimal 2024-03-10 19:26:39 -05:00
8011c5e8b9 Finished script to create and package statically linked binary on Linux 2024-03-10 16:13:45 -05:00
24eda2d16a Updated TODO 2024-03-10 16:13:26 -05:00
418579a627 Added C++ standard as a compiler flag, which is apparently needed by compilers on macOS 2024-03-10 01:09:31 -06:00
6acbf90d80 Updated UNIX macro checks, to account for MacOS 2024-03-10 00:51:20 -06:00
2c7d1d0b43 Started working on client-side decoding of IPv6 code 2024-03-09 21:34:47 -05:00
00b83e6de2 Added bash flag to fail if any command in the script fails 2024-03-09 21:34:09 -05:00
9881567009 Created a script to build statically-linked binaries on Linux 2024-03-09 21:33:49 -05:00
f23f307e17 Updated TODO 2024-03-09 21:33:22 -05:00
dd658c9c1d WROTE IN AIRPLANE: Checked edge case where the number is zero 2024-03-09 21:05:38 -05:00
52f8034f4e Rudimentary support for IPv6 in server socket creation
I haven't completely implemented it yet, but I did come up with a basic algorithm
to convert the IPv6 address into a 'code' form. I still have to write the code to
actually create the socket, though.
2024-03-09 19:32:45 -05:00
8758060bfb Updated TODO 2024-03-09 19:32:03 -05:00
10f91fafd4 Updated README 2024-03-09 19:31:51 -05:00
e9405b69e7 Updated README 2024-03-09 12:46:52 -05:00
9a12edcdb1 Started working on better error handling, by throwing exceptions and displaying error messages in the GUI 2024-03-09 11:05:04 -05:00
83a0d5beb4 Updated files to reflect change in easysock (from CPP to C) 2024-03-09 11:04:17 -05:00
eeae444b1d Moved display_text_centered() into a separate file, since I could possibly extend this file with other raygui helper functions 2024-03-09 11:03:27 -05:00
f9d5e8cdeb Converted easysock from CPP to C, because it was mostly just C code anyways 2024-03-09 11:02:50 -05:00