summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
Commit message (Collapse)AuthorAgeFilesLines
* [Bug 3598300]: unix: tcl.h does not include sys/stat.hjan.nijtmans2013-01-151-3/+3
|
* Factor out creation of the -sockname and -peername lists frommax2012-11-261-48/+70
| | | | | TcpGetOptionProc() to TcpHostPortList(). Make it robust against implementations of getnameinfo() that error out if reverse mapping fails instead of falling back to the numeric representation.
* Final part of result generation conversion (modulo any minor blunders)dkf2012-08-051-68/+78
|
* Use EAI_SYSTEM only if it exists.max2012-06-261-6/+1
|
* Rework the error message generation of [socket], so that the errormax2012-06-221-10/+13
| | | code of getaddrinfo is used instead of errno unless it is EAI_SYSTEM.
* Avoid calling close() on a bogus fd when an attempt to open a client socketdgp2012-05-221-0/+3
| | | with an unsupported address family leaves one behind.
* don't try to run the cpuid test when cpuid is not availablejan.nijtmans2012-05-031-0/+2
|\
* | 3428753 Fix [socket -async] connections that manage to connect synchronously.dgp2012-05-031-2/+2
| |
* | * Use the values returned by getaddrinfo() for all three arguments to ↵max2012-03-191-1/+22
| | | | | | | | | | socket() instead of only using ai_family. * Try to keep the most meaningful error while iterating over the result list, because using the last error can be misleading.
* | [Bug 3401422] Cache script-level changes to the nonblocking flag of an async ↵ferrieux2011-09-011-1/+7
| | | | | | | | client socket in progress, and commit them on completion.
* | Put back the check for server sockets (bug #3394732).max2011-08-291-0/+9
| |
* | 3364777 Stop segfault caused by reading from struct after it had been freed.dgp2011-07-121-1/+4
| |
* | * unix/tclUnixSock.c (CreateClientSocket): Fix and simplify posting of ↵max2011-06-281-19/+56
| | | | | | | | | | the writable fileevent at the end of an asynchronous connection attempt. Improve comments for some of the trickery around [socket -async]. [Bug 3325339] * tests/socket.test: Adjust tests to the async code changes. Add more tests for corner cases of async sockets.
* | * doc/socket.n: Document the fact that the event loop is now needed for ↵max2011-06-161-1/+2
| | | | | | | | | | | | [socket -async] * unix/tclUnixSock.c: Set up the file handler for async sockets to fire on exceptions in addition to writable state. * tests/socket.test: Improve error reporting when socket-14.2 times out.
* | Simplify file descriptor handling for client sockets and derivedmax2011-06-071-42/+38
| | | | | | | | | | server sockets by putting an instance of TcpFdList into TcpState instead of just a pointer. Now only server sockets that listen on multiple addresses need the linked list of file descriptors.
* | Fix bug#3084338, a memleak when a [socket -async] was closed before the ↵max2011-06-071-29/+22
| | | | | | | | connection had succeeded or failed.
* | * Don't use port 0 for test 14.2 as it fails in different ways on Linux ↵max2011-06-061-30/+29
| | | | | | | | | | | | | | and NetBSD. * Unify channel name creation. * Prevent error messages from appearing twice. * Double the measured latency in socket.test to be on the safe side.
* | * Improve socket.test by checking the latency on the loopback address and ↵max2011-06-011-33/+33
| | | | | | | | | | use that for some of the tests instead of fixed "big enough" times. * Improve correctness of [socket -async] in some error cases.
* | * Fix setting up of [fileevent] while an async socket is still in progress max2011-05-301-42/+59
| | | | | | | | * Cache async socket errors for later use by [fconfigure -error] * Add tests for the above
* | Fix [socket -async] for DNS names with more than one addressmax2011-05-271-98/+133
| |
* | * unix/tclUnixSock.c (TcpWatchProc): No need to check for server sockets ↵max2011-05-111-18/+9
| | | | | | | | | | here, as the generic server code already takes care of that. * tests/socket.test (accept): Add tests to make sure that this remains so.
* | Adjust ckalloc/ckfree macros to greatly reduce number of explicit casts indkf2011-03-121-15/+13
| | | | | | rest of Tcl source code. No ABI change. API change *should* be harmless.
* | Now that we're no longer using SCM based on RCS, the RCS Keyword linesdgp2011-03-021-2/+0
|\ \ | |/ | | cause more harm than good. Purged them (except in zlib files).
| * Now that we're no longer using SCM based on RCS, the RCS Keyword lines causedgp2011-03-021-2/+0
| |\ | | | | | | more harm than good. Purged them.
| | * 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.
| | * Removed unused variablesvasiljevic2006-09-071-6/+1
| | |
| | * Rewritten MT-safe wrappers to return ptrs to TSD storagevasiljevic2006-09-071-12/+3
| | |
| | * Added MT-safe implementation of some library calls.vasiljevic2006-09-061-1/+15
| | | | | | | | | | | | See Tcl Bug 999544 for more information.
| | * Added no-op TclpFinalizeSockets()vasiljevic2006-03-101-1/+23
| | |
* | | * win/tclWinSock.c (CreateSocket): Swap the loops overrmax2010-12-141-19/+19
| | | | | | | | | | | | | | | | | | | | | * unix/tclUnixSock.c (CreateClientSocket): local and remote addresses, so that the system's address preference for the remote side decides which family gets tried first. Cleanup and clarify some of the comments.
* | | Change first parameter of TclSockMinimumBuffers to ClientData, and ↵nijtmans2010-12-101-3/+3
| | | | | | | | | | | | TclWin(Get|Set)SockOpt to SOCKET, because on Win64 those are 64-bit, which does not fit.
* | | * unix/tclUnixSock.c: Prevent calls freeaddrinfo(NULL) which candgp2010-10-281-3/+7
| | | | | | | | | | | | crash some systems. Thanks Larry Virden. [Bug 3093120]
* | | * unix/tclUnixSock.c (TcpGetOptionProc): Prevent crash if interp isdkf2010-10-261-11/+9
| | | | | | | | | | | | * win/tclWinSock.c (TcpGetOptionProc): NULL (a legal situation).
* | | Add support for ::tcl::unsupported::noReverseDNSrmax2010-10-261-4/+9
| | |
* | | * unix/tclUnixSock.c (CreateClientSocket): Fix a memleak andrmax2010-10-121-16/+6
| | | | | | | | | | | | refactor the calls to freeaddrinfo() [Bug #3084338].
* | | * doc/socket.n: Document the changes to the [socket] and rmax2010-09-281-362/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [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.
* | | Eliminate various unnecessary type casts, use function typedefs whenever ↵nijtmans2010-06-211-9/+9
| | | | | | | | | | | | possible
* | | Make the code prettierdkf2010-03-011-5/+10
| | |
* | | Refrain from a possibly lengthy reverse-DNS lookup on 0.0.0.0 whenferrieux2010-03-011-4/+10
| | | | | | | | | | | | | | | calling [fconfigure -sockname] on an universally-bound (default) server socket.
* | | * 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.
* | | * unix/tclUnixPort.h: Move all socket-related code from tclUnixChan.crmax2009-06-151-1/+1151
| | | | | | | | | | | | | | | * unix/tclUnixChan.c: to tclUnixSock.c. * unix/tclUnixSock.c:
* | | Get rid of pre-C89-isms (esp. CONST vs const).dkf2008-04-271-6/+6
|/ /
* | merge stable branch onto HEADdgp2007-12-131-1/+1
| |
* | Whitespace/format cleanupdkf2007-07-311-4/+4
| |
* | Complete the purge of K&R function definitions from manually-written code.dkf2007-04-161-2/+2
| |
* | Rewritten MT-safe wrappers to return ptrs to TSD storage.vasiljevic2006-09-071-17/+3
| |
* | Added fixes for Tcl Bug 999544 (ported from core-8-4-branch).vasiljevic2006-09-061-1/+15
| |
* | Added no-op TclpFinalizeSockets().vasiljevic2006-03-101-1/+23
| |
* | More bits of ANSIfyingdkf2005-11-111-27/+39
| |
* | * unix/tclUnixSock.c (InitializeHostName): Synchronized use ofandreas_kupries2005-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | static modifier in declaration and definition of function. * unix/tclUnixChan.c (FileTruncateProc): Synchronized use of static modifier in declaration and definition of function. * generic/tclResult.c (ReleaseKeys): Synchronized use of static modifier in declaration and definition of function. * generic/tclListObj.c (NewListIntRep): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (InitializeEncodingSearchPath): Synchronized use of static modifier in declaration and definition of function. * generic/tclEncoding.c (FillEncodingFileMap): Synchronized use of static modifier in declaration and definition of function. * generic/tclIORChan.c (RcNewHandle): Synchronized use of static modifier in declaration and definition of function.