summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
Commit message (Collapse)AuthorAgeFilesLines
* (SocketEventProc) : connect errors should fire both the readable anddavygrvy2004-05-051-2/+6
| | | | writable handlers because this is how it works on UNIX [Bug 794839]
* (SocketThreadExitHandler): Don't call TerminateThread whendavygrvy2004-02-211-14/+5
| | | | | | | WaitForSingleObject returns a timeout. Tcl_Finalize called from DllMain will pause all threads. Trust that the thread will get the close notice at a later time if it does ever wake up before being cleaned up by the system anyway.
* All uses of 'panic' (the macro) changeddavygrvy2003-12-241-2/+2
| | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* (SocketThreadExitHandler) : added a TerminateThread fallback just in casedavygrvy2003-12-121-2/+12
| | | | | the socket handler thread is really in a paused state. This can happen when Tcl is being unloaded by the OS from an exception handler.
* * win/tclWinSock.c (TcpWatchProc): Watch for FD_CLOSE too whenandreas_kupries2003-10-231-3/+3
| | | | | | | | asked for writable events by the generic layer. (SocketEventProc): Generate a writable event too when a close is detected. Together the changes fix [Bug 599468].
* Changed comment to note that OpenWatcom suffers the same missing LPFN_*davygrvy2003-08-271-2/+2
| | | | typedef ssue as MinGW and cygwin.
* * The changes below fix SF bugs [593810], and [718045].andreas_kupries2003-04-221-1/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tclIO.c (Tcl_CutChannel, Tcl_SpliceChannel): Invoke TclpCutSockChannel and TclpSpliceSockChannel. * generic/tclInt.h: Declare TclpCutSockChannel and TclpSpliceSockChannel. * unix/tclUnixSock.c (TclpCutSockChannel, TclpSpliceSockChannel): Dummy functions, on unix the sockets are _not_ handled specially. * mac/tclMacSock.c (TclpCutSockChannel, TclpSpliceSockChannel): * win/tclWinSock.c (TclpCutSockChannel, TclpSpliceSockChannel): New functions to handle socket specific cut/splice operations: auto-initi of socket system for thread on splice, management of the module internal per-thread list of sockets, management of association of sockets with HWNDs for event notification. * win/tclWinSock.c (NewSocketInfo): Extended initialization assignments to cover all items of the structure. During debugging of the new code mentioned above I found that two fileds could contain bogus data. * win/tclWinFile.c: Added #undef HAVE_NO_FINDEX_ENUMS before definition because when compiling in debug mode the compiler complains about a redefinition, and this warning is also treated as an error.
* * win/tclWin32Dll.c (squelch_warnings): Squelchmdejong2003-01-161-18/+20
| | | | | | | | | | | | | | | | | | | | | | compiler warnings from SEH ASM code. * win/tclWinChan.c (squelch_warnings): Squelch compiler warnings from SEH ASM code. * win/tclWinDde.c: Add casts to avoid compiler warnings. Pass pointer to DWORD instead of int to avoid compiler warnings. * win/tclWinFCmd.c (squelch_warnings): Add casts and fixup decls to avoid compiler warnings. Squelch compiler warnings from SEH ASM code. * win/tclWinFile.c: Add casts and fixup decls to avoid compiler warnings. Remove unused variable. * win/tclWinNotify.c: Declare as DWORD instead of int to avoid compiler warning. * win/tclWinReg.c: Add casts to avoid compiler warning. Fix assignment in if expression bug. * win/tclWinSerial.c: Add casts to avoid compiler warnings. Remove unused variable. * win/tclWinSock.c: Add casts and fixup decls to avoid compiler warnings.
* * win/configure: Regen.mdejong2003-01-131-1/+59
| | | | | | | | | * win/configure.in: Check for typedefs like LPFN_ACCEPT in winsock2.h and define HAVE_NO_LPFN_DECLS if not found. * win/tclWinSock.c: Define LPFN_* typedefs if HAVE_NO_LPFN_DECLS is defined. This fixes the build under Mingw and Cygwin, it was broken by the changes made on 2002-11-26.
* * win/tclWinSock.c (SocketThreadExitHandler, InitSockets): Checkdavygrvy2002-12-081-15/+17
| | | | | | | | that the tsdPtr is valid before dereferencing as we call it from the exit handler, too [Bug 650353]. Another WSAStartup() loaded version comparison byte swap issue fixed. Although 0x0101 byte swapped is still 0x0101, properly claiming which is major/minor is more correct.
* * win/tclWinSock.c: WSAStartup() loaded version comparisondavygrvy2002-11-271-7/+25
| | | | error which resulted in 2.0 looking less than 1.1.
* * win/tclWinSock.c: Removed shutdown() from the functiondavygrvy2002-11-271-12/+7
| | | | | table as it wasn't referenced anywhere and cleaned-up some casting that that wasn't needed.
* Missed a couple left-overs from my TcpAccept hack. Now fixed. Sorry for thedavygrvy2002-11-271-33/+16
| | | | confusion.
* adjusted some commentary to be more accurate.davygrvy2002-11-271-5/+6
|
* Incorrect local edit of this file was previously committed that included adavygrvy2002-11-271-108/+61
| | | | TcpAccept() hack that has no business being in the core.
* * win/tclWinPort.h:davygrvy2002-11-271-402/+580
| | | | | | | | | | | | | | | | | | * win/tclWinSock.c: This patch does two things: 1) Cleans-up the winsock typedefs by using the typedefs provided by winsock2.h. This has no effect on how winsock is initialized; just makes the source code easier to read. [Patch 561305] 2) Revamps how the socket message handler thread is brough up and down to allows for cleaner exits without the use of TerminateThread(). TerminateThread is evil. No attempt has been made to resolve [Bug 593810] which may need a new channel driver version for adding a registering function whithin the transfered thread to init the handler thread. IOW, initialization of the TSD structure was getting bypassed through the thread extension's [thread::transfer] command.
* * win/tclWinConsole.c:davygrvy2002-11-261-2/+2
| | | | | | | | | | | | | | | | * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c: * win/tclWinThrd.c: * win/tclWinTime.c: General cleanup of all worker threads used by the channel drivers. Eliminates the normal case where the worker thread is terminated ('cept the winsock one). Instead, use kernel events to signal a clean exit. Only when the worker thread is blocked on an I/O call is the thread terminated. Essentially, this makes all other channel worker threads behave like the PipeReaderThread() function for it's cleaner exit behavior. This appears to fix [Bug 597924] but needs 3rd party confirmation to close the issue.
* * win/tclWinSock.c (TcpWatchProc): Fixed SF Tcl Bug #557878. Weandreas_kupries2002-05-241-18/+21
| | | | | | are not allowed to mess with the watch mask if the socket is a server socket. I believe that the original reporter is George Peter Staplin.
* Corrections to earlier TIP 27 changes.dgp2002-01-241-2/+2
| | | | Thanks to Andreas Kupries for the feedback.
* * Updated socket interfaces according to TIP 27. Updated callers.dgp2002-01-231-11/+11
|
* * Updated APIs in the file generic/tclIO.c according to the guidelinesdgp2002-01-151-5/+5
| | | | | | | | | | | of TIP 27. Several minor documentation corrections as well. * Updated channel driver interface according to the guidelines of TIP 27. See also [Bug 500348]. * Moved Tcl_EolTranslation enum declaration from generic/tcl.h to generic/tclInt.h (renamed to TclEolTranslation). It is not used anywhere in Tcl's public interface.
* * win/tclWinSock.c (TcpGetOptionProc): Fix for tcl bug itemandreas_kupries2001-12-131-7/+16
| | | | | | #478565 reported by an unknown person. Bypasses all calls to "gethostbyaddr" for address "0.0.0.0" to prevent delays on Win/NT.
* win/tclWinSock.c (SocketThread): corrected pointer cast for _WIN64.hobbs2001-09-201-2/+2
|
* * win/tclWinSock.c (SocketEventProc): Fixed race condition inhobbs2001-03-311-2/+2
| | | | | readability of socket on Windows. [Patch #410674, Bug #219205 #219333]
* up-port of the stacked channel implementation rewrite in 8.3.2 tohobbs2000-09-281-11/+15
| | | | 8.4a2 code base, merged in with some existing new 8.4a2 features.
* * win/tclWin32Dll.c:hobbs1999-12-091-31/+16
| | | | | | | | | | | | | | | * win/tclWinChan.c: * win/tclWinFCmd.c: * win/tclWinInit.c: * win/tclWinPipe.c: * win/tclWinSock.c: removed all code that supported Win32s. It was no longer officially supported, and likely didn't work anyway. * win/makefile.vc: removed 16 bit stuff, cleaned up. * win/tcl16.rc: * win/tclWin16.c: * win/winDumpExts.c: these files have been removed from the source tree (no longer necessary to build) * win/aclocal.m4: made it just include tcl.m4
* * win/tclWinSock.c: Added comment block to SocketThread()redman1999-08-011-8/+27
| | | | | | function. Added code to avoid calling TerminateThread(), but instead to send a message to the socket event window to tell it to terminate its thread.
* * win/tclWinPipe.c:redman1999-07-311-3/+4
| | | | | | | | | | * win/Makefile.in: Fixing launching of 16-bit apps on Win9x from wish. The command line was primed with tclpip82.dll, but it was ignored. Fixed that, then fixed the gmake makefile to build tclpip82.dll as an executable. * win/tclWinSock.c: Applied small patch to get thread-specific data after initializing the socket driver.
* win/tclWinSock.c: free Win32 Event handles when destroying socketredman1999-07-291-1/+6
| | | | helper threads.
* Bug fixes for threaded Tcl on NT with single and dual CPUs. Still someredman1999-07-271-1/+10
| | | | open issues, this code is a little more stable though.
* Fix hange with socket code (win32) with threads enabled, fixedredman1999-07-221-14/+26
| | | | | the semaphores for threads disabled. Fixed calling of tcltest in Makefile.in (win32) and fixed safe-6.3 for threads enabled.
* * win/tclWinSock.c: Modified 8.1.0 version of the Win32 socketredman1999-07-211-2279/+2421
| | | | | | | | | driver to move the handling of the socket event window in a separate thread. It also turned out that Win95 & Win98 were, in some cases, getting multiple FD_ACCEPTs but only handling one. Added a count for the FD_ACCEPT to take care of this. Tested on NT4 SP3, NT4 SP4, Win95, and Win98. [Bug: 2178 2256 2259 2329 2323 2355]
* * win/tclWinSock.c: Rolled back to the 8.1.0 implementationstanton1999-06-081-2674/+2279
| | | | | | because of serious problems with the new driver. Basically no incoming socket connections would be reported to a server port. The 8.1.1 code needs to be redesigned and fixed correctly.
* generic/tclThreadTest.c: Fix race condition in testthread code.redman1999-05-261-10/+21
| | | | | | win/tclWinSock.c: Fixed hang in WinNT socket driver, now wakes up the socket thread to check for events that didn't trigger the WSAEvent.
* Improved socket driver, use WSAEventSelect on NTredman1999-04-221-122/+506
|
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-276/+395
|
* * Merge 8.0.5 changes:stanton1999-04-151-1/+9
| | | | | | | | | - Mac changes for final release - Minor fixes to tools configure file * win/tclWinSock.c: Apply patch to allow write access to a socket if FD_WRITE is sent but FD_CONNECT is not. Some strange problem with either Win32 or a socket driver. [Bug: 1664 1776]
* Merged stubs changes into mainline for 8.0stanton1999-03-101-7/+7
|
* * unix/tclUnixChan.c:stanton1999-02-031-3/+21
| | | | | | | * win/tclWinSock.c: * doc/socket.n: Applied Gordon Chaffee's patch to handle failures during asynchronous socket connection operations. This adds a new "-error" fconfgure option to socket channels. [Bug: 893]
* * tclWinSock.c (CreateSocket, TcpAccept): Windows NT createsstanton1998-12-041-1/+15
| | | | | sockets so they are inheritable by default. Turn off this bit so sockets aren't kept open by exec'ed processes. [Bug: 892]
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* fixed bug in socket code: use of FIONREAD is not supported on Windowsstanton1998-05-271-93/+100
| | | | changed to completely drain the socket window before checking any state
* Initial revisionrjohnson1998-03-261-0/+2113