forked from vsrinivas/fuchsia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsocket.fidl
25 lines (20 loc) · 1009 Bytes
/
socket.fidl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library zx;
[Transport = "Syscall"]
protocol socket {
/// Create a socket.
socket_create(uint32 options) -> (status status, handle out0, handle out1);
/// Write data to a socket.
/// Rights: handle must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_WRITE.
socket_write(handle:SOCKET handle, uint32 options, vector_void buffer)
-> (status status, optional_usize actual);
/// Read data from a socket.
/// Rights: handle must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_READ.
socket_read(handle:SOCKET handle, uint32 options)
-> (status status, vector_void buffer, optional_usize actual);
/// Prevent reading or writing.
/// Rights: handle must be of type ZX_OBJ_TYPE_SOCKET and have ZX_RIGHT_WRITE.
socket_shutdown(handle:SOCKET handle, uint32 options) -> (status status);
};