Age | Commit message (Collapse) | Author | Files | Lines |
|
Add aio sockopt to get and set various socket options
via setsockopt()/getsockopt()
And remove 'aio tcp_nodelay' in favour of 'aio sockopt tcp_nodelay'
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Sockets need extra work on Windows, so not supported there yet.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Enable or disable Nagle's algorigthm
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The test for ECONNABORTED was reversed such that errors such as ENXIO
did not correctly return an error.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Compiling for C++ (as is needed for Metakit extension) generates an
error due to the use of the reserved word 'template' as an argument
name.
Renaming this argument
|
|
pkgconfig for SDL causes _GNU_SOURCE to be defined on the commandline,
hence causing an error when these source files re-define it.
|
|
This option returns a list of support subcommands and is
useful for command line completion.
Support added to: socket, namespace, tcl::prefix, string, dict, info
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Enough to make serial ports work and support raw and cooked input/output
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
When creating ~/.jim_history, set permissions to 0600 for security
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And improve the tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
Also, fix build if JIM_OPTIMIZATION is disabled
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
eventloop doesn't need a filehandle, so so simplify the interface
by using file descriptors instead
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Makes it easier to run the test suite if a minmal 'package require'
is supported.
Also omit SSL code from jim-aio.c
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Due to not having support for group or owner permission flags.
|
|
Fix incorrect check for target as invalid filehandle.
e.g. stdin copy blah
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
The following changes were not merged:
- commit examples/{certificate,key}.pem
- return AioFile from JimMakeChannel to allow ssl-specific settings to be set
- improve examples/ssl.{client,server} so they work out-of-the-box
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
in aio_cmd_ssl()
|
|
|
|
It is simpler if af->ssl is handled after creating the channel
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Example usage:
set s [socket stream.server 127.0.0.1:8443]
set c [[$s accept] ssl -server certificate.pem key.pem]
puts [$c gets]
|
|
|
|
If the underlying platform supports fsync(), $handle sync
invokes fsync() on the stream file descriptor.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Removes some duplicated code
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
This applies to [exec] and [file tempfile]
Reported-by: Jakub Wilk
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
onexecption was using the wrong location
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Keep coverity happy
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Avoids a coverity warning
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
Sweep through and clean up all (most) of the comments in the code.
While there, adjust some variable and function names to be more consistent,
and make a few small code changes - again, mostly for consistency.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
In case not in the global namespace
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Tabs accidentally crept into source files in violaton of the style guide
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Creates a pair of bidirectional sockets with socketpair(2)
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Currently only for sockets since Jim Tcl does not support
bidirectional pipes.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
aio [open], as well as similar commands return the name of the
created command. If this is done in the non-global namespace, the
returned name is implicitly scoped to the current namespace while
the actual command is created in the global namespace. Thus [close]
does not work when invoked in that namespace.
The solution is to return a fully qualified name, such as ::aio.handle3
Note that this may also be a problem for similar command such as
[proc] and [alias] that return command names.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
It was possible for a handler to be deleted
(e.g. if the handler threw an error), but the
channel handle to still maintain a pointer to the
handler script.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Previously, Jim_DeleteFileHandler() would indiscriminately
delete the first matching file handler in the list.
Instead, it should delete the file handler matching the event mask.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For platforms which don't have long long
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Reported-by: af123 <jimdevel@hummypkg.org.uk>
|
|
On cygwin, ECONNRESET can happen when the other
end closes the connection. Treat it like EOF.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|