📄 helpsock.cpp
字号:
#include <windows.h>
#include <winsock.h>
#include <process.h>
#include "telnet.h"
char const* sockmsg(int ecode)
{
switch(ecode)
{
// programming errors
// (should never occour in release code?)
case WSASYSNOTREADY: return "tcp/ip network not ready";
case WSAEINVAL: return "invalid winsock version";
case WSAVERNOTSUPPORTED: return "wrong winsock version";
case WSANOTINITIALISED: return "winsock not initialized";
case WSAEINTR: "The call was canceled";
case WSAEINPROGRESS: "A blocking winsock operation is in progress";
default: return "unknown winsock error";
// general TCP problems
case WSAENETDOWN: return "winsock has detected that the network subsystem has failed";
// GetXbyY related errors:
case WSAHOST_NOT_FOUND: return "Authoritative Answer Host not found";
case WSATRY_AGAIN: return "Non-Authoritative Host not found, or SERVERFAIL";
case WSANO_RECOVERY: "Nonrecoverable errors: FORMERR, REFUSED, NOTIMP";
case WSANO_DATA: "Valid name, no data record of requested type";
}
}
_tag_well_known_port_numbers well_known_port_numbers[] =
{
{7,"echo"},
{9,"discard"},
{13,"daytime"},
{19,"chargen"},
{21,"ftp"},
{23,"telnet"},
{25,"smtp"},
{70,"gopher"},
{79,"finger"},
{80,"http"},
{110,"pop3"},
{119,"nntp"},
{191,"prospero"},
{194,"irc"},
{0,0}
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -