Diff
Not logged in

Differences From Artifact [7540a90f84]:

To Artifact [319c30754b]:


1
2
3
4
5
6
7
8
9
10
11

12
13
14
15
16
17
18
1
2
3
4
5
6
7
8
9
10

11
12
13
14
15
16
17
18










-
+







/* 
 * tclWinSock.c --
 *
 *	This file contains Windows-specific socket related code.
 *
 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclWinSock.c,v 1.18.2.1 2000/07/27 01:39:26 hobbs Exp $
 * RCS: @(#) $Id: tclWinSock.c,v 1.18.2.2 2001/04/03 22:54:40 hobbs Exp $
 */

#include "tclWinInt.h"

/*
 * The following variable is used to tell whether this module has been
 * initialized.
222
223
224
225
226
227
228
229

230
231
232
233
234
235
236
222
223
224
225
226
227
228

229
230
231
232
233
234
235
236







-
+







    TcpOutputProc,		/* Output proc. */
    NULL,			/* Seek proc. */
    NULL,			/* Set option proc. */
    TcpGetOptionProc,		/* Get option proc. */
    TcpWatchProc,		/* Set up notifier to watch this channel. */
    TcpGetHandleProc,		/* Get an OS handle from channel. */
    NULL,			/* close2proc. */
    TcpBlockProc,		/* Set blocking/non-blocking mode. */
    TcpBlockProc,		/* Set socket into (non-)blocking mode. */
    NULL,			/* flush proc. */
    NULL,			/* handler proc. */
};

/*
 * Define version of Winsock required by Tcl.
 */
832
833
834
835
836
837
838

839
840
841
842
843
844
845
846
847
848
832
833
834
835
836
837
838
839
840
841

842
843
844
845
846
847
848







+


-







	FD_SET(infoPtr->socket, &readFds);
	timeout.tv_usec = 0;
	timeout.tv_sec = 0;
 
	if ((*winSock.select)(0, &readFds, NULL, NULL, &timeout) != 0) {
	    mask |= TCL_READABLE;
	} else {
	    infoPtr->readyEvents &= ~(FD_READ);
	    SendMessage(tsdPtr->hwnd, SOCKET_SELECT,
		    (WPARAM) SELECT, (LPARAM) infoPtr);
	    infoPtr->readyEvents &= ~(FD_READ);
	}
    }
    if (events & (FD_WRITE | FD_CONNECT)) {
	mask |= TCL_WRITABLE;
    }

    if (mask) {