After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 621138 - soup_server_new by socket
soup_server_new by socket
Product: libsoup
Classification: Core
Component: API
Other Linux
: Normal enhancement
: ---
Assigned To: libsoup-maint@gnome.bugs
: 648551 (view as bug list)
Depends on:
Reported: 2010-06-09 18:18 UTC by Arc Riley
Modified: 2014-05-02 13:23 UTC
See Also:
GNOME target: ---
GNOME version: ---

Proposed implementation (13.43 KB, patch)
2014-03-15 21:20 UTC, Krzysztof Konopko
none Details | Review
Proposed implementation (13.60 KB, patch)
2014-03-15 23:07 UTC, Krzysztof Konopko
none Details | Review

Description Arc Riley 2010-06-09 18:18:36 UTC
We are implementing a server which includes the ability to "upgrade" itself in runtime (actually, just runs the upgraded version of itself as a separate process and pipes its current configuration including any open sockets).

While this is primarily useful for XMPP sessions, which we would prefer not to interrupt to upgrade the server, we would also like the HTTP (BOSH) socket(s) to transfer so new connections queue in the time between when the old server stops accepting them and the new server is ready (vs being unable to connect).

Being able to "pickle" a soup chunked session and transfer it to a new server instance would be even nicer, such that downloads are not interrupted for such a process, but are not as critical as the listening socket in our uses.
Comment 1 Simon McVittie 2012-01-10 16:19:09 UTC
*** Bug 648551 has been marked as a duplicate of this bug. ***
Comment 2 Simon McVittie 2012-01-10 16:19:45 UTC
The duplicate bug #648551 has a patch, although I haven't reviewed it or anything.
Comment 3 Krzysztof Konopko 2014-03-15 21:20:57 UTC
Created attachment 272032 [details] [review]
Proposed implementation

Here's a patch that actually works.  It's used in a commercial product (a set-top-box).  Please have a look.

Comment 4 Krzysztof Konopko 2014-03-15 23:07:30 UTC
Created attachment 272044 [details] [review]
Proposed implementation

Actually I adapted this patch to match with what's in master.

BTW, see also this discussion:

PS. Since Debian goes for systemd now, it's worth to make libsoup a good systemd citizen, isn't it? :)

Comment 5 Dan Winship 2014-03-16 02:26:22 UTC
oops, synchronicity. I implemented this (for the next release cycle) last week. See the "server-api" branch in git (though things may still change before it lands on master)
Comment 6 Dan Winship 2014-05-02 13:22:57 UTC
fixed in git master; the new SoupServer API allows setting up multiple listeners (after construct-time). You can use soup_server_listen_socket() to listen on a pre-existing GSocket, or soup_server_listen_fd() to listen on a pre-existing socket fd.