summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixSock.c
Commit message (Collapse)AuthorAgeFilesLines
* [f2336c116b] Move pragmas to make gcc happy; it is pickier than clang.dkf2017-06-141-3/+3
|
* merge core-8-6-branchjan.nijtmans2017-04-281-1/+1
|\
| * (cherry-pick from "fix-1997007" branch): fix typo- resp. copy-paste-bug ↵jan.nijtmans2017-04-281-1/+1
| | | | | | | | (using wrong threadInfo pointer in ConsoleOutputProc, should be writer, not reader)
* | [50750c735a] Fix broken test and stop reading uninit-but-allocated memory in ↵dkf2017-04-271-6/+28
|\ \ | |/ | | | | zlib channel transform.
| * Deal with a couple of obscure causes of warnings on some versions of OSX.dkf2017-04-251-7/+28
| |
* | More minor style fixes.dkf2017-04-101-24/+24
| |
* | Merge Harald's "robust-async-connect-tests" branch. Thanks!jan.nijtmans2017-04-101-0/+24
|\ \
| * \ merge trunkjan.nijtmans2014-07-181-2/+56
| |\ \
| * | | Replaced option "-unsupported1" by test command "testsocket debugflags" ↵oehhar2014-07-171-54/+13
| | | | | | | | | | | | | | | | (thanks Donal, Donald).
| * | | Robust async connect tests by temporarely switching off auto continuation. ↵oehhar2014-06-051-1/+66
| | | | | | | | | | | | | | | | Ticket [13d3af3ad5]
* | | | Minor style issues through the socket implementation code.dkf2017-04-091-115/+161
| | | |
* | | | In TclGetNumberFromObj() macro (tclExecute.c): Don't fill in type if ↵jan.nijtmans2017-02-031-1/+1
| | | | | | | | | | | | | | | | | | | | TCL_ERROR is returned: The caller doesn't do anything with this. Don't access (non-const) variable tclEmptyStringRep any more, use its value (&tclEmptyString) directly. Only keep it in tclPkg.c, for error checking.
* | | | Make OpenTcpServerEx accept a 'service' string parameter instead of a port.limeboy2016-12-141-2/+7
| | | |
* | | | Allow a boolean argument to be passed.limeboy2016-11-241-1/+2
| | | |
* | | | Implement the whole TIP 456 specification.limeboy2016-11-241-21/+20
| | | | | | | | | | | | | | | | Also introduces the `-reuseaddr' and `-reuseport' options for the `socket' command.
* | | | Fix indentingjan.nijtmans2016-11-221-8/+8
| | | |
* | | | Added stub entry for tip #456. Documentation and tests still missing. ↵jan.nijtmans2016-11-221-8/+6
| | | | | | | | | | | | | | | | Doesn't conform to TIP yet.
* | | | This is patch.002 from ticket ↵jan.nijtmans2016-11-221-0/+20
| | | | | | | | | | | | | | | | [0b9d3ba2ba3e1e3fc33c97d5a9fa7ef85d11a696|0b9d3ba2ba], as first start of tip-456 implementation
* | | | Use more "size_t" in stead of "int" internall. Also eliminate a lot of ↵jan.nijtmans2016-11-161-3/+3
| | | | | | | | | | | | | | | | type-casts which are not necessary any more.
* | | | Fix [3cc1d91345]: duplicate calls to TclpFreeAllocCache() on thread existsjan.nijtmans2016-10-111-1/+1
|\ \ \ \ | | |_|/ | |/| |
| | | |
| \ \ \
*-. \ \ \ [4d5ae7d88a] Stop crashes with asynchronous connects to hosts without addresses.dkf2016-10-041-1/+1
|\ \ \ \ \ | | |/ / /
| | * | | [4d5ae7d88a] Stop crashes with asynchronous connects to hosts without addresses.dkf2016-10-041-1/+1
| | | | |
| * | | | [4d5ae7d88a] Restore default-to-error logic in TcpConnecttkt_4d5ae7d88agahr2016-09-271-1/+1
| | | | |
* | | | | When opening a server socket on an ephemeral port, make sure that themax2016-10-041-1/+38
|/ / / / | | | | | | | | | | | | | | | | port number that gets picked for IPv4 is also available on IPv6. If not, start all over for up to ten times to find a port number that is available on both protocols.
* | | | Tcl_SetVar -> Tcl_SetVar2 and comparable replacements, eliminating functions ↵jan.nijtmans2016-06-291-1/+1
|/ / / | | | | | | | | | which are deprecated.
* | | 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
| |