提交 5d0ab5bf 编写于 作者: Y Yi Huang 提交者: hydai

[Doc] Add type `address`.

上级 b4bad799
...@@ -667,6 +667,14 @@ ...@@ -667,6 +667,14 @@
) )
) )
;;; Socket address
(typename $address
(struct
(field $buf (@witx pointer u8))
(field $buf_len $size)
)
)
;;; Socket type ;;; Socket type
(typename $sock_type (typename $sock_type
(enum u8 (enum u8
......
...@@ -37,9 +37,8 @@ ...@@ -37,9 +37,8 @@
;;; Note: This is similar to `bind` in POSIX. ;;; Note: This is similar to `bind` in POSIX.
(@interface func (export "bind") (@interface func (export "bind")
(param $fd $fd) (param $fd $fd)
;;; The pointer to and length of the buffer for address. ;;; The pointer to the address.
(param $addr_buf (@witx pointer u8)) (param $addr (@witx pointer $address))
(param $addr_buf_len $size)
(result $error $errno) (result $error $errno)
) )
...@@ -66,9 +65,8 @@ ...@@ -66,9 +65,8 @@
;;; The pointer to and length of the buffer for data received. ;;; The pointer to and length of the buffer for data received.
(param $buf (@witx pointer u8)) (param $buf (@witx pointer u8))
(param $buf_len $size) (param $buf_len $size)
;;; The pointer to and length of the buffer for source address. ;;; The pointer to the source address.
(param $addr_buf (@witx pointer u8)) (param $addr (@witx pointer $address))
(param $addr_buf_len $size)
;;; Message flags. ;;; Message flags.
(param $flags $riflags) (param $flags $riflags)
(result $error $errno) (result $error $errno)
...@@ -98,9 +96,8 @@ ...@@ -98,9 +96,8 @@
;;; The pointer to and length of the buffer for data. ;;; The pointer to and length of the buffer for data.
(param $buf (@witx pointer u8)) (param $buf (@witx pointer u8))
(param $buf_len $size) (param $buf_len $size)
;;; The pointer to and length of the buffer for destination address. ;;; The pointer to the destination address.
(param $addr_buf (@witx pointer u8)) (param $addr (@witx pointer $address))
(param $addr_buf_len $size)
;;; Message flags. ;;; Message flags.
(param $_flags $siflags) (param $_flags $siflags)
(result $error $errno) (result $error $errno)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册