Re: Does Epiphany use sys/socket.h

Michael Catanzaro <[email protected]> Tue, 15 May 2018 14:35:51 -0500
Newsgroups gmane.comp.gnome.apps.epiphany
Message-ID <[email protected]>
Hi Michele,

Sounds like a pretty difficult project.

There are several layers involved: Epiphany -> WebKit -> libsoup -> 
GIO. At the lowest level, it all comes down to GIO's network classes 
[1]. Those are implemented using the BSD sockets API. You'll probably 
need to reimplement GSocket [2] on top of your new API, which will be a 
pretty big project. There are other classes that make direct use of the 
BSD sockets API that would also need to be replaced: I know that 
includes GInetAddress and GSocketAddress, at least. That should suffice 
if you want to replace just use of internet sockets. If you want to 
replace use of Unix sockets too, that will be even harder as there are 
a bunch more classes listed at [1] that would need to be reworked 
(including GCredentials).

You could alternatively try changing SoupSocket [3] to use your API 
instead of GSocket. That would probably be a lot easier. It's possible 
that some code that I don't know about may be using GSocket directly, 
but I think Epiphany probably only ever uses GSocket for internet 
connections via SoupSocket.

Good luck,

Michael

[1] https://developer.gnome.org/gio/stable/networking.html
[2] https://gitlab.gnome.org/GNOME/glib/blob/master/gio/gsocket.c
[3] https://git.gnome.org/browse/libsoup/tree/libsoup/soup-socket.c