summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
Commit message (Collapse)AuthorAgeFilesLines
* 3574493 Avoid hanging on exit due to use of synchronization calls indgp2012-11-071-6/+7
| | | routines called by DllMain().
* Revert most of [ae92de6078], since when we let cygwin share the win32 stub ↵jan.nijtmans2012-05-221-6/+23
| | | | | | table this is no longer necessary implement TclpInetNtoa for win32 Let cygwin share stub table with win32
* [Bug 510001]: TclSockMinimumBuffers needs plat impjan.nijtmans2012-04-041-3/+3
|\
| * better solution for bug-510001bug_510001jan.nijtmans2012-03-291-2/+2
|/ | | it fills a correctly working stub entry for Win64
* [Bug 3388350] mingw64 compiler warningsjan.nijtmans2011-08-151-3/+2
|
* Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-011-2/+0
| | | more harm than good. Purged them.
* * tclWinsock.c: [Bug 3056775]: Fixed race condition between threadandreas_kupries2010-09-241-1/+47
| | | | | | and internal co-thread access of a socket's structure because of the thread not using the socketListLock in TcpAccept(). Added documentation on how the module works to the top.
* Backport fix for [Bug 1028264]: WSACleanup() too early. The fix introduces ↵ferrieux2009-04-271-2/+2
| | | | "late exit handlers" for similar late process-wide cleanups.
* Backport fix for [Bug 2446662]: resync Win behavior on RST with that of unix ↵ferrieux2009-04-271-2/+14
| | | | (EOF).
* * win/tclWinSock.c (Tcl_GetHostName): update to previous fix tohobbs2007-11-291-40/+16
| | | | set hostname length appropriately, clean up check overall.
* * win/tclWinSock.c: Add missing encoding conversion of thedgp2007-11-271-5/+16
| | | | | | [info hostname] value from the system encoding to Tcl's internal encoding. This is important now that ICANN no longer limits host names to ASCII. [Bug 1823552]
* * win/makefile.vc: Updated MSVC build to properly deal withpatthoyts2006-09-261-2/+2
| | | | | | | | * win/nmakehlp.c: MSVC8 and AMD64 target. Backport from 8.5 * win/rules.vc: * generic/tcl.h: Fixed stat definition for MSVC8 AMD64. * win/tclWinSock.c: Casting type police. * win/tclWinTime.c:
* Finalization of the sockets is now solely done invasiljevic2006-03-101-62/+72
| | | | | | | TclpFinalizeSockets() and not over the thread-exit handler, because the order of actions the Tcl generic core will impose may result in cores/hangs if the thread exit handler tears down socket subsystem too early (See Tcl Bug #1437595).
* Apply [Patch 1353853] to prevent UMR randomness.dkf2005-11-281-2/+2
|
* TIP#218 IMPLEMENTATIONandreas_kupries2005-01-271-22/+101
| | | | | | | | | | | | | | | | | | | | | * generic/tclDecls.h: Regenerated from tcl.decls. * generic/tclStubInit.c: * doc/CrtChannel.3: Documentation of extended API, * generic/tcl.decls: extended testsuite, and * generic/tcl.h: implementation. Removal of old * generic/tclIO.c: driver-specific TclpCut/Splice * generic/tclInt.h: functions. Replaced with generic * tests/io.test: thread-action calls through the * unix/tclUnixChan.c: new hooks. Update of all builtin * unix/tclUnixPipe.c: channel drivers to version 4. * unix/tclUnixSock.c: Windows drivers extended to * win/tclWinChan.c: manage thread state in a thread * win/tclWinConsole.c: action handler. * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c: * mac/tclMacChan.c:
* * win/tclWinSock.c:davygrvy2004-05-061-4/+9
| | | | | | | | | | | (SocketThreadExitHandler): Don't call TerminateThread when 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. (SocketEventProc) : connect errors should fire both the readable and writable handlers because this is how it works on UNIX [Bug 794839]
* * 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].
* * 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]