100dc94bd3
Add function definition to header file
2025-07-18 11:11:45 -04: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
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
4001135451
Integrated upstream changes, since I forgot to pull before making local changes.
2024-03-11 01:32:56 -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
6acbf90d80
Updated UNIX macro checks, to account for MacOS
2024-03-10 00:51:20 -06:00
64aa4b1850
Replaced 'linux' with '__unix__' because the same header files are included on macOS as well.
2024-03-05 07:50:32 -05:00
8e3488b904
Added a virtual destructor to the Sock class, which would allow Server and Client to override it
2024-03-01 11:31:15 -05:00
4b3d5387a1
Changed code to support Windows libraries and functions as well
2024-02-29 16:38:36 -05:00
a37ec79f09
Changed 'recvAll' return type from std::string to char pointer, and created a non-blocking version of the function
2024-02-28 00:04:43 -05:00
f0e30f28e9
Updated header files to reflect recent change in implementation files
2024-02-21 22:26:59 -05:00
cacc4f9d33
Included string header instead of iostream header, as this file doesn't need iostream
2024-02-15 09:47:25 -05:00
195d6c4b4b
Separated 'Sock' file into header and implementation file, and added include guards to header file
2024-02-14 18:30:09 -05:00
2e6b01a9bb
Defined a parent 'socket' class that both 'Client' and 'Server' can inherit from
2024-02-14 08:08:38 -05:00