summaryrefslogtreecommitdiffstats
path: root/win/tclWinSock.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | | * doc/socket.n: Document the changes to the [socket] and rmax2010-09-281-171/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [fconfiguyre] commands. * generic/tclInt.h: Introduce TclCreateSocketAddress() as a * generic/tclIOSock.c: replacement for the platform-dependent * unix/tclUnixSock.c: TclpCreateSocketAddress() functions. * unix/tclUnixChan.c: Extend the [socket] and [fconfigure] * unix/tclUnixPort.h: commands to behave as proposed in * win/tclWinSock.c: TIP #162. * win/tclWinPort.h: * compat/fake-rfc2553.c: A compat implementation of the APIs * compat/fake-rfc2553.h: defined in RFC-2553 (getaddrinfo() and friends) on top of the existing gethostbyname() etc. * unix/configure.in: Test whether the fake-implementation is * unix/tcl.m4: needed. * unix/Makefile.in: Add a compile target for fake-rfc2553. * win/configure.in: Allow cross-compilation by default * tests/socket.test: Improve the test suite to make more use of * tests/remote.tcl: randomized ports to reduce interference with tests running in parallel or other services on the machine.
* | | * 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.
* | | Various clean-ups, converting from tclWinProc->xxxProc directly to Xxxnijtmans2010-09-131-3/+3
| | | | | | | | | | | | (no change in functionality)
* | | [Freq 2965056]: Windows build with -DUNICODEnijtmans2010-08-301-2/+2
| | |
* | | Unnecessary type casts, See Tcl [Patch #2997087]nijtmans2010-05-111-7/+7
| | | | | | | | | | | | Don't duplicate CYGWIN timezone #define from tclPort.h in tclWinPort.h
* | | TCHAR-related fixes, making those files compile fine when TCHAR != charnijtmans2010-05-041-5/+6
| | | | | | | | | | | | Please see comments in [Freq 2965056] (2965056-1.patch).
* | | test that tclOO stubs are present in stub librarynijtmans2010-03-071-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Applied missing part of [Patch 2961556] Change all tclWinProcs signatures to use TCHAR* in stead of WCHAR*. This is meant as preparation to make [Enh 2965056] possible at all.
* | | Eliminate all internal Tcl_WinUtfToTCharnijtmans2010-02-151-2/+2
| | | | | | | | | | | | | | | and Tcl_WinTCharToUtf calls, needed for mslu support.
* | | * win/tclWinDde.c: VC++ 6.0 doesn't havenijtmans2010-01-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * win/tclWinReg.c PDWORD_PTR * win/tclWinThrd.c: Fix various minor gcc warnings. * win/tclWinTime.c * win/tclWinConsole.c Put channel type definitions * win/tclWinChan.c in static const memory * win/tclWinPipe.c * win/tclWinSerial.c * win/tclWinSock.c * generic/tclIOGT.c * generic/tclIORChan.c * generic/tclIORTrans.c * unix/tclUnixChan.c * unix/tclUnixPipe.c * unix/tclUnixSock.c * unix/configure (regenerated with autoconf 2.59) * tests/info.test: Make test independant from tcltest implementation.
* | | Various CYGWIN-related fixes. In the win32 configure script, CYGWIN is still ↵nijtmans2009-12-211-3/+3
| | | | | | | | | | | | not enabled yet, but at least it is a step in the right direction.
* | | Fix [Bug 1028264]: WSACleanup() too early. The fix introduces "late exit ↵ferrieux2009-01-271-2/+2
| | | | | | | | | | | | handlers" for similar late process-wide cleanups.
* | | Fix [Bug 2446662]: resync Win behavior on RST with that of unix (EOF).ferrieux2009-01-261-2/+14
| | |
* | | TIP #332 IMPLEMENTATION - Half-Close for Bidirectional Channelsferrieux2008-12-181-2/+55
| | |
* | | Style improvements - invoking callbacks without visual junk.dkf2008-10-261-4/+4
|/ /
* | Add a linker hint for msvc to include ws2_32.libpatthoyts2008-02-221-1/+5
| |
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | * win/configure, win/tcl.m4: add ws2_32.lib / -lws2_32 to build.hobbs2007-11-301-281/+80
| | | | | | | | | | * win/tclWinSock.c: remove dyn loading of winsock, assume that it is always available now.
* | * generic/tclWinSock.c (InitializeHostName): Correct error indgp2007-11-291-3/+3
| | | | | | | | | | | | buffer length tracking. After gethostname() writes into a buffer, convert only the written string to internal encoding, not the whole buffer.
* | * win/tclWinSock.c: Add mising encoding conversion of the [infodgp2007-11-271-5/+10
| | | | | | | | hostname] value from the system encoding to Tcl's internal encoding.
* | various "const" additions, in line with TIP #27nijtmans2007-02-201-14/+14
| |
* | Minor updates (convert comment-outs to #ifdef outs, clean up comments/indents)dkf2007-01-021-106/+120
| |
* | * win/tclWinSock.c: Correct un-initialized Tcl_DString. Thanksdgp2006-07-241-15/+17
| | | | | | | | to afredd. [Bug 1518166]
* | * win/tclWinInit.c: More careful calls to Tcl_DStringSetLength()dgp2006-04-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | * win/tclWinSock.c: to avoid creating invalid DString states. * win/tclWinDde.c: Bump to version 1.3.2. [RFE 1366195] * library/dde/pkgIndex.tcl: * library/reg/pkgIndex.tcl: Bump to registry 1.1.6 * win/tclWinReg.c: * win/configure.in: Bump package version numbers. * win/configure: autoconf 2.59
* | * doc/CrtChannel.3: Added TCL_CHANNEL_VERSION_5, made itandreas_kupries2006-03-271-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * generic/tcl.h: the version where the "truncateProc" * generic/tclIO.c: is defined at, and moved all channel * generic/tclIOGT.c: drivers of Tcl to v5. * generic/tclIORChan.c: * unix/tclUnixChan.c: * unix/tclUnixPipe.c: * win/tclWinChan.c: * win/tclWinConsole.c: * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c:
* | Finalization of the sockets/pipesvasiljevic2006-03-101-55/+68
| | | | | | | | | | | | | | | | is now solely done in TclpFinalizeSockets() and TclpFinalizePipes() 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 corresponding subsystem(s) too early.
* | Export stubs for libtommath; fix mingw compiler warningsKevin B Kenny2005-12-131-9/+9
| |
* | ANSIfydkf2005-11-041-112/+123
| |
* | Applied patch #1096916 to support building with MSVC 8.patthoyts2005-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | * generic/regerror.c: Avoid use of reserved word. * generic/tcl.h: Select the right Tcl_Stat structure * generic/tclDate.c: Casts to handle 64 bit time_t case. * tests/env.test: Include essential envvar on Win32 * win/nmakehlp.c: Handle new return codes. * win/makefile.vc: Use the selected options. * win/rules.vc: Check options are applicable * win/tclWinPort.h: Disable deprecated function warnings * win/tclWinSock.c: Provide default value to avoid warning. * win/tclWinTime.c: Add casts to handle 64bit time_t type.
* | Getting more systematic about styledkf2005-07-241-703/+688
| |
* | * unix/tclUnixSock.c: Use a ProcessGlobalValue to store thedgp2005-07-131-47/+56
| | | | | | | | | | | | | | * win/tclWinSock.c: value returned by Tcl_GetHostName() ([info hostname]). Also re-order initialization of the value on Windows to favor GetComputerName() over gethostname() as a source of the information.
* | Merged kennykb-numerics-branch back to the head; TIPs 132 and 232Kevin B Kenny2005-05-101-1/+1
| |
* | TIP#218 IMPLEMENTATIONandreas_kupries2005-01-271-124/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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:
* | Style fixesdkf2004-10-061-5/+11
| |
* | (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.