Socket.h
上传用户:garry_shen
上传日期:2015-04-15
资源大小:45647k
文件大小:1k
- #ifndef __SOCKET
- #define __SOCKET
- #include <windows.h>
- #define CALLWGS "0.0.0.0"
- #define WS_ERROR -1
- #define WS_OK 0
- #define WS_WAIT 1
- #define INPUT_SIZE 16384
- #define BUF_SIZE 1024
- #define MAXHOSTNAME 128
- struct SEND_DATA
- {
- SOCKET hsock;
- char *lpstrBuf;
- int iLen;
- SEND_DATA *next;
- };
- u_long GetIPAddr(LPTSTR);
- SOCKET InitClient(PSOCKADDR_IN,HWND,u_int);
- int CloseConn(SOCKET&,LPTSTR,int,HWND);
- int SendData(SOCKET,LPTSTR,int);
- int RecvData(SOCKET,LPTSTR,int);
- #endif