15 Commits (5fe24bffd9c6d136a2ae091721d6431375b37e5b)

Author SHA1 Message Date
Aadhavan Srinivasan fd4ad04aeb Removed unnecessary comment 7 months ago
Aadhavan Srinivasan d842485103 Throw errno instead of errno * -1, if an error is encountered with sending or receiving 7 months ago
Aadhavan Srinivasan 550643281e Replace all instances of sockaddr with sockaddr_storage 7 months ago
Aadhavan Srinivasan 24b2a83044 Used a sockaddr_storage struct instead of a sockaddr struct, since the latter is not big enough for IPv6 7 months ago
Aadhavan Srinivasan 54f7dbe7ee Modified recvAllNB() to return an empty string (instead of NULL) if there is nothing to read 7 months ago
Aadhavan Srinivasan fc59a7221b Removed unnecessary #include 7 months ago
Aadhavan Srinivasan 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.
7 months ago
Aadhavan Srinivasan 83a0d5beb4 Updated files to reflect change in easysock (from CPP to C) 7 months ago
Aadhavan Srinivasan 8e3488b904 Added a virtual destructor to the Sock class, which would allow Server and Client to override it 8 months ago
Aadhavan Srinivasan a37ec79f09 Changed 'recvAll' return type from std::string to char pointer, and created a non-blocking version of the function 8 months ago
Aadhavan Srinivasan 6155cb0463 Wrote code to null-terminate the string sent in sendAll, and the string received in recvAll 8 months ago
Aadhavan Srinivasan 9954a18171 Made the sendAll and recvAll functions in sock.cpp use variables set by the children, rather than having the functions pass parameters 8 months ago
Aadhavan Srinivasan 5a8a42a828 Added comments to explain functions, and added UDP handling 8 months ago
Aadhavan Srinivasan 3d944f2ed1 Added additional header file 8 months ago
Aadhavan Srinivasan 195d6c4b4b Separated 'Sock' file into header and implementation file, and added include guards to header file 8 months ago