summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
Commit message (Collapse)AuthorAgeFilesLines
* Deal with a couple of obscure causes of warnings on some versions of OSX.dkf2017-04-251-7/+28
|
* [4d5ae7d88a] Stop crashes with asynchronous connects to hosts without addresses.dkf2016-10-041-1/+1
|
* Merge trunkoehhar2014-12-171-25/+25
|\
| * Remove a number of eol-spaces. No change in functionality.jan.nijtmans2014-11-141-25/+25
| |
| * fconfigure -peername and -sockname return empty string while async connect ↵oehhar2014-10-171-6/+26
| |\ | |/ |/| | | running.
* | Implemented tip-427: socket fconfigure option -connecting plus no ↵oehhar2014-09-261-7/+27
|/ | | | -peername,-sockname when still connecting.
* [1758a0b603] socket_*-2.13 : Workaround the broken select() in some Linuxdgp2014-06-161-2/+56
|\ | | | | | | kernels that fails to report a writable state on a socket when an error condition (or remote close) is present.
* | Valgrind doesn't like use of uninitialized variables.dgp2014-06-041-1/+1
| |
* | These edits make the tests socket-14.11.[01] stop hanging, but also introducedgp2014-06-021-5/+3
| | | | | | a whole raft of test failures. WIP.
* | * Give clearer names to some of the state flags and sync them with ↵bug_13d3af3ad5max2014-04-081-41/+90
| | | | | | | | | | | | | | Windows where it makes sense. * Rework WaitForConnect once more to always report ENOTCONN on I/O operations on failed async sockets. * Fix synchronous connections to a server that only listens on IPv6 (or whatever comes later in the list returned by getaddrinfo(), socket-15.*) * Fix spurious writable event on async sockets (socket-14.15).
* | Rename error to connectError in struct TcpState.max2014-04-071-11/+11
| |
* | Rename CreateClientSocket to TcpConnectmax2014-04-071-8/+8
| |
* | * Rework WaitForConnect() to fix synchronous completion of asynchronous ↵max2014-04-041-30/+24
| | | | | | | | | | | | connections. * Let TcpInputProc() and TcpOutputProc() fail before calling any I/O syscalls when an asynchronous connection has failed. * Adjust the tests accordingly.
* | Make the naming of TcpState variables consistentmax2014-04-041-49/+53
| |
* | * More test improvements for async sockets.max2014-03-141-7/+21
| | | | | | | | * Advance async connections whenever the channel is touched (e.g. by [chan configure]). * Add a noblock argument to WaitForConnect(), so that advancing async connections from [chan configure] doesn't block even on a blocking socket.
* | * Hide transient errors of the internal iterations of [socket -async] ↵max2014-03-111-41/+34
| | | | | | | | | | from the script level. * More tests for corner cases.
* | WaitForConnect may only call back to CreateClientSocket when the socket is ↵max2014-03-101-1/+3
| | | | | | | | writable or something. When it does so for a pending socket, it is falsely assumed to have succeeded and a subsequent read/write operation will fail.
* | * tclUnixSock.c: Fix WaitForConnect() for client sockets that have to try ↵max2014-03-101-9/+11
| | | | | | | | | | | | more than one address. * socket.test: Extend and improve tests for [socket -async] * socket.test: Add latency measuring and calculation for Windows.
* | Broken intermediate state.max2014-02-281-0/+15
| | | | | | | | | | Calling back to CreateClientSocket() from the event loop works, but the final failed or succeeded state of an asyncronous socket does not get notified to the channel correctly.
* | Revert [3c0b0bbda6]. If this really is a problem, it needs to get fixed by ↵max2013-11-181-3/+2
| | | | | | | | other means than covering behind void pointers.
* | Fix [5425f2c082]: [fconfigure -error] breaks the background processing of a ↵max2013-11-121-5/+14
| | | | | | | | pending [socket -async].
* | Fix 3 trivial (possible) errors, discovered by covertity.comjan.nijtmans2013-09-041-0/+2
| |
* | Fix compiler warning when compiling Itcl 4.0:jan.nijtmans2013-07-031-2/+3
| | | | | | | | | | | | In file included from ./generic/itcl2TclOO.c:12:0: /Tcl/include/tclInt.h:3012:8: warning: ‘struct addrinfo’ declared inside parameter list [enabled by default] const char **errorMsgPtr); ^
* | [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
| | |