Age | Commit message (Collapse) | Author | Files | Lines |
|
Now that the I/O subsystem does auto-flush on write we no longer
need to manually set up a writable handler.
|
|
And add a default implementation of tcl::stdhint to add
hinting for some built-in commands.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This changes especially makes buffered I/O work
with non-blocking channels.
- separate read and write buffering
- support for timeout on blocking read
- read/write on same channel in event loop with buffering
- read buffer is the same across read, gets, copyto
- autoflush non-blocking writes via event loop
- copyto can now copy to any filehandle-like command
- add some copyto tests
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Supports communication with redis as part of an event loop
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Document changes since 0.81 and add documentation for new
filename return for sockets.
Internal version is now 0.82 in preparation for (eventual) 0.82
release.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Now a default constructor is created, as an alias for defaultconstrutor.
The constructor is passed the arguments to new and by default
this accepts a dictionary that is checked for valid instance variables and sets them.
However the constructor can be replaced by one that takes arbitrary arguments.
Thus we can how have:
a new -optiona -optionb
And the constructor is invoked with arguments '-optiona -optionab'.
This makes object initialisation more flexible.
** Note: This is an incompatible change if you have classes with a constructor
and you create object instances with new <dict>.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Documentation fixes -
Co-authored-by: Adrian Ho <the.gromgit@gmail.com>
|
|
More gracefully handle errors, e.g. the redis server going
away in line with how a real client would do this.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For retrieving type information of return values.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Previously calling gets on a non-blocking stream could easily
result in a partial line. Now if a partial line is read, return zero/empty
to indicate that nothing is available while storing the partial line.
The next call to gets (typically within a readable script) will continue
appending to the previous partial line until a complete line can be returned.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
Also add some additional tools that use xtrace.
examples/jcov - code coverage
examples/jtime - code coverage that measures execution time
examples/jtrace - trace script execution
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Requires a truetype font file
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Add example of integrating SDL event loop and the Tcl event loop
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And add:
- poll ?script?
- optional window title
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Now we only support using pkg-config to find SDL, and prefer SDL2 over SDL.
For compatibility between versions, the render surface is now cleared on flip.
And closing the window now results in a JIM_EXIT return code from flip.
Also supports [sdl clear] to clear the background to a given colour.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Using the hiredis client library.
Synchronous API only.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For some SSL connections it is necessary to set the Server Name
Indication in the connection in order to receive the correct
certificate. Allow this as part of the client ssl call with:
$sock ssl -sni $servername
Also for -server mode, allow the certificate and private key to be
stored in a single file and only be specified once.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Keep newer libssl happy
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Also add support for sockname and peername
And remove unix domain sockets when the socket is closed
And generally clean up the socket support
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Now simply 'wait'
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Avoids situations where the output might block
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
With 'history completion <cmd>'
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
e.g. a usb-serial port
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Prevent multiple access to a serial port by using locking.
This is probably compatible with most serial port locking on Linux.
Perhaps on macosx.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Example of using the aio termios support
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
- Added support for constructor, runs on new object creation
- Added support for "unknown" method
- Rename some dispatch variables (add double underscore) to avoid collision with user variables
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>
|
|
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]
|
|
|
|
Now uses [info complete] to support continuations.
Includes error code indication
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>
|
|
Now that Jim Tcl supports namespaces, dns.tcl from
tcllib can be used with very few changes.
Revert as much as possible to the original tcllib version
in order to better show the differences between Jim Tcl and big Tcl.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
See README.namespaces
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>
|
|
Redefining upvar links is no longer allowed
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
...over baseclass vars.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
And fconfigure for Tcl compatibility
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This is take from the tcllib dns package and shows the
high level of compatibility with Tcl.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Some tests are already in tests/, move some others.
Move some examples to the examples directory
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
And document the OO extension in README.oo
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Loadable modules should be tried before script packages.
If a script accidentally tried to require itself, infinite recursion resulted.
It is a bad idea to name a script the same as an extension/package.
Also, keep the package name off the stack.
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>
|
|
Uses a Tcl wrapper, popen, from tclcompat
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Use -ipv6 to signify that ipv6 should be used
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Make exec-9.7 test more reliable
Quieten jim tests unless running manually
Add jim pipe example
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|