📄 scon.h
字号:
/* dftp: FTP client example * Copyright (c) 1996 by Donald C. Asonye * Email: donald@uh.edu * * scon.h. * * This and other files are hereby released to the public for * educational purposes. You may redistribute this and other files * or routines as long as you are not compensated for it, and as * long as this notice is included with it. You may not use the * released source codes in anyway commercial without permission. * * It'd be nice if you share your modifications with me and everyone * else. I encourage you to make the code better as I am very busy. * * Share your knowledge :) */#ifndef _SCON_H_#define _SCON_H_#include <stdio.h>#include <stdlib.h>#include <string.h>#if (defined( _WIN32 ) || defined( WIN32 ))# include<winsock.h># include<conio.h># include<wincon.h>#define EINTR WSAEINTR #else# include <sys/types.h># include <sys/time.h># include <sys/stat.h># include <ctype.h># include <fcntl.h># include <sys/errno.h># include <sys/socket.h># include <netinet/in.h># include <netdb.h># include <unistd.h>#define INVALID_SOCKET (~0)#endif#define DEFAULT_PORT_NUM 21/* * if your compiler does not define _WIN32, then use something * that it defines. (FOR PC USERS) */#if (defined( _WIN32 ) || defined( WIN32 ))#define bzero(x,y) memset(x,0,y)#define bcopy(x,y,z) memcpy(y,x,z)#define close closesocket#endifint hListenSocket = INVALID_SOCKET, hControlSocket= INVALID_SOCKET, hDataSocket= INVALID_SOCKET, Connected = 0;char szHost[1024] = {0};int bSendPort = 1; /* prototypes maybe*/int GetReply(), GetLine(), SendControlMsg(char *, int), ConnectToServer(char *name, char *port), GetListenSocket();#endif /* !_SCON_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -