From 65b1eda6c31feb24ee4a7b43004e42aa29be55ad Mon Sep 17 00:00:00 2001 From: "HuYingzhuo(hugo/hyzboy)" Date: Thu, 26 May 2022 19:41:47 +0800 Subject: [PATCH] removed NetworkPort.cpp --- inc/hgl/network/Socket.h | 2 -- src/NetworkPort.cpp | 50 ---------------------------------------- 2 files changed, 52 deletions(-) delete mode 100644 src/NetworkPort.cpp diff --git a/inc/hgl/network/Socket.h b/inc/hgl/network/Socket.h index a4b1707..5bdeb69 100644 --- a/inc/hgl/network/Socket.h +++ b/inc/hgl/network/Socket.h @@ -87,8 +87,6 @@ namespace hgl namespace network { - const uint16 GetPort(const char *scheme); - int CreateSocket(const IPAddress *); ///<创建Socket void CloseSocket(int); ///<关闭socket diff --git a/src/NetworkPort.cpp b/src/NetworkPort.cpp deleted file mode 100644 index 322e670..0000000 --- a/src/NetworkPort.cpp +++ /dev/null @@ -1,50 +0,0 @@ -#include -#include - -namespace hgl -{ - namespace network - { - namespace - { - struct SchemePort - { - uint16 port; - char scheme[8]; - }; - - const SchemePort SchemePortList[]= - { - {21, "ftp"}, - {22, "ssh"}, - {23, "telnet"}, - {25, "smtp"}, - {53, "dns"}, - {80, "http"}, - {80, "ws"}, - {119, "nntp"}, - {143, "imap"}, - {389, "ldap"}, - {443, "https"}, - {443, "wss"}, - {465, "smtps"}, - {554, "rtsp"}, - {636, "ldaps"}, - {853, "dnss"}, - {993, "imaps"}, - {5060, "sip"}, - {5061, "sips"}, - {5222, "xmpp"} - }; - } - - const uint16 GetPort(const char *scheme) - { - for(const SchemePort &sp:SchemePortList) - if(strcmp(scheme,sp.scheme)==0) - return sp.port; - - return 0; - } - }//namespace network -}//namespace hgl