fpagliughi / sockpp

Modern C++ socket library.
BSD 3-Clause "New" or "Revised" License
782 stars 126 forks source link

Fixed problems with sys_error exception #20

Closed snej closed 5 years ago

snej commented 5 years ago

Fixes #18, fixes #19

fpagliughi commented 5 years ago

Awesome again. I don't have time to test or work on this for the next few days, but this looks pretty good. I can say, for one, that sys_error not publicly inheriting from std::exception was a mistake/bug on my part. It should have been from the start.

fpagliughi commented 5 years ago

This doesn't build on Windows.

sockpp.git\src\exception.cpp(41): fatal error C1083: Cannot open include file: 'netdb.h': No such file or directory[sockpp.git\build\src\sockpp-objs.vcxproj]
  inet_address.cpp
sockpp.git\src\inet_address.cpp(67): error C2065: 'EAI_SYSTEM': undeclared identifier [sockpp.git\build\src\sockpp-objs.vcxproj]

I'll see if I can figure it out.

fpagliughi commented 5 years ago

OK. Cool. I fixed this and merged it into the 'develop' branch. I did the following:

We should write some unit tests to make sure this behaves as expected.

Thanks again!