imapext-2007
diff src/osdep/dos/tcp_wsk.h @ 0:ada5e610ab86
imap-2007e
author | yuuji@gentei.org |
---|---|
date | Mon, 14 Sep 2009 15:17:45 +0900 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/osdep/dos/tcp_wsk.h Mon Sep 14 15:17:45 2009 +0900 1.3 @@ -0,0 +1,50 @@ 1.4 +/* ======================================================================== 1.5 + * Copyright 1988-2006 University of Washington 1.6 + * 1.7 + * Licensed under the Apache License, Version 2.0 (the "License"); 1.8 + * you may not use this file except in compliance with the License. 1.9 + * You may obtain a copy of the License at 1.10 + * 1.11 + * http://www.apache.org/licenses/LICENSE-2.0 1.12 + * 1.13 + * 1.14 + * ======================================================================== 1.15 + */ 1.16 + 1.17 +/* 1.18 + * Program: Winsock TCP/IP routines 1.19 + * 1.20 + * Author: Mike Seibel from Unix version by Mark Crispin 1.21 + * Computing & Communications 1.22 + * University of Washington 1.23 + * Administration Building, AG-44 1.24 + * Seattle, WA 98195 1.25 + * Internet: MRC@CAC.Washington.EDU 1.26 + * 1.27 + * Date: 11 April 1989 1.28 + * Last Edited: 30 August 2006 1.29 + */ 1.30 + 1.31 +/* TCP input buffer -- must be large enough to prevent overflow */ 1.32 + 1.33 +#define BUFLEN 16384 /* 32768 causes stdin read() to barf */ 1.34 + 1.35 +#include <windows.h> 1.36 +#define _INC_WINDOWS 1.37 +#include <winsock.h> 1.38 + 1.39 + 1.40 +/* TCP I/O stream (must be before osdep.h is included) */ 1.41 + 1.42 +#define TCPSTREAM struct tcp_stream 1.43 +TCPSTREAM { 1.44 + char *host; /* host name */ 1.45 + char *remotehost; /* remote host name */ 1.46 + unsigned long port; /* port number */ 1.47 + char *localhost; /* local host name */ 1.48 + SOCKET tcpsi; /* tcp socket */ 1.49 + SOCKET tcpso; /* tcp socket */ 1.50 + long ictr; /* input counter */ 1.51 + char *iptr; /* input pointer */ 1.52 + char ibuf[BUFLEN]; /* input buffer */ 1.53 +};