All,
The socket library I've been working off-and-on on for some time is now listed on the Dumping Ground. Gamsock is a POSIX socket library with an API similar to the Scsh socket API. It makes applications possible with Gambit that aren't possible with its built in TCP port API, including applications that use UDP, or Unix-domain or IPv6 sockets.
It's available on GitHub: https://github.com/bitwize/gamsock
Happy socket hacking!
--Jeff
Afficher les réponses par date
Hi Jeff!
Great!
This is useful in several ways.
One usecase when it's quite critical is if implementing networked Gambit-based applications that do not use Gambit's runtime library.
Some side reflections on Gambit UDP/IPv6 support and uses for direct access to socket routines like your library provides and cooperation between that and Gambit's IO system:
I believe there is some UDP support implemented into Gambit's ports system, Marc mentioned he has preliminary such in this email https://mercure.iro.umontreal.ca/pipermail/gambit-list/2006-July/000769.html . I'd be interested in getting my hands on this someday as it supposedly is integrated with the Gambit scheduler, which is useful for several things.
I thought I remembered there's an IPv6 patch for Gambit's builtin IO but can't find any reference to it right now. In all cases it would be a very worthy thing to do, to get UDP and hybrid-IPv4-v6 support into Gambit.
There are ways to wrap OS sockets into Gambit ports and the other way around (for TCP only?). Sometimes this is useful. Could be explored by a library.
For instance, to make a Unix socket server and client Gambit port implementation. If of interest to anyone, I have code for one or two routines in this area to share.
Or, doing accept:s with your library in such a way that the IP of the other host is registered and retained by the Gambit application, and then otherwise keeping ordinary Gambit TCP port behavior for the accepted connection.
Best regards, Mikael
2012/10/25 Jeff Read bitwize@gmail.com
All,
The socket library I've been working off-and-on on for some time is now listed on the Dumping Ground. Gamsock is a POSIX socket library with an API similar to the Scsh socket API. It makes applications possible with Gambit that aren't possible with its built in TCP port API, including applications that use UDP, or Unix-domain or IPv6 sockets.
It's available on GitHub: https://github.com/bitwize/gamsock
Happy socket hacking!
--Jeff
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
Thanks for the library, Jeff.
Talking about sockets: For those of you that missed the draft SRFI-106 "Basic socket interface", please have a look at it and the discussion
http://srfi.schemers.org/srfi-106/
Sven
On Thu, Oct 25, 2012 at 3:26 AM, Sven Hartrumpf hartrumpf@gmx.net wrote:
Thanks for the library, Jeff.
Talking about sockets: For those of you that missed the draft SRFI-106 "Basic socket interface", please have a look at it and the discussion
Imnsho the proposed API is clunky and not as complete as Gamsock's API (which is really quite small and elementary, btw).
All credit goes to Olin Shivers as the designer of the API I used for Gamsock; I just made some tweaks such as raising Gambit os-exceptions when a socket procedure returns an error, the 'internet6-address' procedures, etc. I've yet to encounter the API designed by Shivers that isn't elegant and well-though-out; it's one of his trademarks. :)
Now that I know of the existence of `##open-predefined' I will look into the possibility of creating an "upper layer" for Gamsock that uses port I/O to send and receive over sockets. And there is of course still database (e.g. DNS name resolution) support left to implement...