mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-03 21:10:30 +00:00
f93c0dc489
Instead of passing the PIDs back and forth in a handshake "Greet" message, just use getsockopt(SO_PEERCRED) on both sides to get the same information from the kernel. This is a nice little simplification of the IPC protocol, although it does not get rid of the handshake since we still have to pass the "client ID" from the server to each client so they know how to refer to themselves. This might not be necessary and we might be able to get rid of this later on.
15 lines
457 B
Text
15 lines
457 B
Text
endpoint ProtocolServer = 9
|
|
{
|
|
// Basic protocol
|
|
Greet() => (i32 client_id)
|
|
|
|
// FIXME: It would be nice if the kernel provided a way to avoid this
|
|
DisownSharedBuffer(i32 shared_buffer_id) => ()
|
|
|
|
// Test if a specific protocol is supported, e.g "http"
|
|
IsSupportedProtocol(String protocol) => (bool supported)
|
|
|
|
// Download API
|
|
StartDownload(String url) => (i32 download_id)
|
|
StopDownload(i32 download_id) => (bool success)
|
|
}
|