Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
WINSK.H
Package: watsock.zip [view]
Upload User: qiye66666
Upload Date: 2007-01-03
Package Size: 202k
Code Size: 2k
Category:
TCP/IP Stack
Development Platform:
Visual C++
- #include "winsock.h" /* Must be included before TCPSTREAM definition */
- /* TCP input buffer -- must be large enough to prevent overflow */
- #define BUFLEN 8192
- /* TCP I/O stream (must be before osdep.h is included) */
- #define TCPSTREAM struct tcp_stream
- TCPSTREAM {
- char *host; /* host name */
- char *localhost; /* local host name */
- SOCKET tcps; /* tcp socket */
- long ictr; /* input counter */
- char *iptr; /* input pointer */
- char ibuf[BUFLEN]; /* input buffer */
- };
- /* Holds the addresses of the socket routines in the socket dll */
- #define SOCKDLL struct SockDll
- SOCKDLL {
- SOCKET (PASCAL FAR * socket)(int af, int type, int protocol);
- int (PASCAL FAR * connect)(SOCKET s, struct sockaddr FAR *name, int namelen);
- int (PASCAL FAR *closesocket)(SOCKET s);
- int (PASCAL FAR *select)(int nfds, fd_set FAR *readfds, fd_set FAR *writefds, fd_set FAR *exceptfds, struct timeval FAR *timeout);
- int (PASCAL FAR *recv)(SOCKET s, char FAR *buf, int len, int flags);
- int (PASCAL FAR *send)(SOCKET s, char FAR *buf, int len, int flags);
- struct hostent * (PASCAL FAR *gethostbyname)(char FAR *name);
- int (PASCAL FAR *gethostname)(char FAR *name, int namelen);
- unsigned long (PASCAL FAR *inet_addr)(char FAR *cp);
- unsigned long (PASCAL FAR *so_rhost)(char **cp);
- u_long (PASCAL FAR *htonl)(u_long hostlong);
- u_short (PASCAL FAR *htons)(u_short hostshort);
- u_long (PASCAL FAR *ntohl)(u_long netlong);
- u_short (PASCAL FAR *ntohs)(u_short hostshort);
- };
- void wat_init_libs(void) ; /* for testing only */
- int TCP_init_libs(char *global_dir);
- void TCP_free_libs(void);