removed NetworkPort.cpp
This commit is contained in:
parent
30dc9c4701
commit
65b1eda6c3
@ -87,8 +87,6 @@ namespace hgl
|
|||||||
|
|
||||||
namespace network
|
namespace network
|
||||||
{
|
{
|
||||||
const uint16 GetPort(const char *scheme);
|
|
||||||
|
|
||||||
int CreateSocket(const IPAddress *); ///<创建Socket
|
int CreateSocket(const IPAddress *); ///<创建Socket
|
||||||
void CloseSocket(int); ///<关闭socket
|
void CloseSocket(int); ///<关闭socket
|
||||||
|
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
#include<hgl/type/DataType.h>
|
|
||||||
#include<hgl/type/StrChar.h>
|
|
||||||
|
|
||||||
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
|
|
Loading…
x
Reference in New Issue
Block a user