2b911105a7
Use 'send()' or 'sendto()' depending on whether or not the socket is
...
already connected to a remote address
2025-07-18 11:11:21 -04:00
af242cb812
Rename function
2025-07-18 11:10:49 -04:00
a7e252acd2
Add method to return whether or not a socket is connected to a remote
...
address
2025-07-18 11:09:56 -04:00
fd4ad04aeb
Removed unnecessary comment
2024-03-18 16:02:57 -04:00
d842485103
Throw errno instead of errno * -1, if an error is encountered with sending or receiving
2024-03-18 13:43:09 -04:00
550643281e
Replace all instances of sockaddr with sockaddr_storage
2024-03-12 09:44:41 -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
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
fc59a7221b
Removed unnecessary #include
2024-03-11 13:18:31 -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
83a0d5beb4
Updated files to reflect change in easysock (from CPP to C)
2024-03-09 11:04:17 -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
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
6155cb0463
Wrote code to null-terminate the string sent in sendAll, and the string received in recvAll
2024-02-23 11:15:45 -05:00
9954a18171
Made the sendAll and recvAll functions in sock.cpp use variables set by the children, rather than having the functions pass parameters
2024-02-21 22:25:52 -05:00
5a8a42a828
Added comments to explain functions, and added UDP handling
2024-02-19 21:32:51 -05:00
3d944f2ed1
Added additional header file
2024-02-15 09:45:47 -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