X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Fnet%2Fconstants.cpp;fp=source%2Fnet%2Fconstants.cpp;h=0000000000000000000000000000000000000000;hp=4de22b42cdb44919857ed12dbe76102fd67bd5a6;hb=593c8202bf8c6ecc563aaacf0811aef953b45f09;hpb=cc2e643d6ec3025db3fb6f0a4c1f77af05cf1026 diff --git a/source/net/constants.cpp b/source/net/constants.cpp deleted file mode 100644 index 4de22b4..0000000 --- a/source/net/constants.cpp +++ /dev/null @@ -1,35 +0,0 @@ -#include "platform_api.h" -#include "constants.h" -#include - -using namespace std; - -namespace Msp { -namespace Net { - -int family_to_sys(Family f) -{ - switch(f) - { - case UNSPEC: return AF_UNSPEC; - case INET: return AF_INET; - case INET6: return AF_INET6; - case UNIX: return AF_UNIX; - default: throw invalid_argument("family_to_sys"); - } -} - -Family family_from_sys(int f) -{ - switch(f) - { - case AF_UNSPEC: return UNSPEC; - case AF_INET: return INET; - case AF_INET6: return INET6; - case AF_UNIX: return UNIX; - default: throw invalid_argument("family_from_sys"); - } -} - -} // namespace Net -} // namespace Msp