emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [feature request] SOCK_SEQPACKET


From: Daniel Hackney
Subject: Re: [feature request] SOCK_SEQPACKET
Date: Thu, 3 Dec 2009 03:04:56 -0500

Simon Leinen <address@hidden> wrote:
>> I'm in pretty much the same boat, as I had never even heard of
>> SOCK_SEQPACKET until I saw that Uzbl uses it. I'll hack on it a bit
>> to test it and make sure it works, but you'll probably want someone
>> with legitimate socket knowledge (i.e. not me ;) to review it before
>> committing anything I turn out.
>
> I probably won't have the time or expertise to review this.

No worries; it seems like SOCK_SEQPACKET is pretty obscure, so not many
people have used it much.

> SOCK_SEQPACKET will select SCTP, which is an alternative transport
> protocol to TCP. It preserves message boundaries and has many other
> features over TCP. [...]

Yikes, I'd hate to have to deal with that! The one nice thing is that it
looks like for Unix sockets, SCTP isn't used, and I was able to
successfully send some data back and forth between Emacs and Python over
a local SOCK_SEQPACKET.

Another complication is that the Linux socket(2) manpage says:

  Some socket types may not be implemented by all protocol families; for
  example, SOCK_SEQPACKET is not implemented for AF_INET.

So we may be kind of out of luck on that front. I'll look into it a bit
more, but it looks like there isn't going to be much we can do about
that without hacking on the kernel or glibc (which I have no intention
of doing :).

> It would probably be a win if Emacs had SCTP support for those who
> need that, if that set of people has a non-empty intersection with the
> set of Emacs users.  The sockets API for SCTP seems to be
> unfinished/in flux - the Internet-Draft
> (http://tools.ietf.org/html/draft-ietf-tsvwg-sctpsocket) seems to have
> expired right now.

>From what I hear, SCTP has some nice semantics, but requires new calls
and fancy stuff which is way beyond my ability.

> It is also 85 pages long.

Ahhhh!!!

> We probably wouldn't want to support all of SCTP's features.  The
> difficulty may be to find out what are the basic useful features that
> make people want to use SCTP rather than TCP...

Not really anything I can do to help there, as I'm pretty much a network
newbie.

At any rate, it looks like supporting SOCK_SEQPACKET over AF_UNIX
wouldn't be that bad (I've basically got it working), so it might be
worth cleaning that up for inclusion and waiting to see if anyone with
the proper knowledge wants to come along and add SCTP support to Emacs.

By the way, there were a few changes that needed to be made in order to
allow creating AF_UNIX SOCK_SEQPACKET servers, basically replacing
"socktype == SOCK_STREAM" with "socktype == SOCK_STREAM || socktype ==
SOCK_SEQPACKET". I've attached a patch (to be applied after Stefan
Monnier's previous patch) which takes care of this.

--
Daniel M. Hackney

Attachment: commit-373bef0
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]