|
56 | 56 | (** {2 Creating or importing sockets} *)
|
57 | 57 |
|
58 | 58 | val import_socket_stream : sw:Switch.t -> close_unix:bool -> Unix.file_descr -> [`Unix_fd | stream_socket_ty] r
|
59 |
| -(** [import_socket_stream ~sw ~close_unix:true fd] is an Eio flow that uses [fd]. |
| 59 | +(** [import_socket_stream ~sw ~close_unix fd] is an Eio flow that uses [fd]. |
60 | 60 |
|
61 | 61 | It can be cast to e.g. {!source} for a one-way flow.
|
62 | 62 | The socket object will be closed when [sw] finishes.
|
63 | 63 |
|
64 | 64 | The [close_unix] and [sw] arguments are passed to {!Fd.of_unix}. *)
|
65 | 65 |
|
| 66 | +val import_socket_listening : sw:Switch.t -> close_unix:bool -> Unix.file_descr -> [`Unix_fd | listening_socket_ty] r |
| 67 | +(** [import_socket_listening ~sw ~close_unix fd] is an Eio listening socket that uses [fd]. |
| 68 | +
|
| 69 | + The socket object will be closed when [sw] finishes. |
| 70 | +
|
| 71 | + The [close_unix] and [sw] arguments are passed to {!Fd.of_unix}. *) |
| 72 | + |
66 | 73 | val import_socket_datagram : sw:Switch.t -> close_unix:bool -> Unix.file_descr -> [`Unix_fd | datagram_socket_ty] r
|
67 |
| -(** [import_socket_datagram ~sw ~close_unix:true fd] is an Eio datagram socket that uses [fd]. |
| 74 | +(** [import_socket_datagram ~sw ~close_unix fd] is an Eio datagram socket that uses [fd]. |
68 | 75 |
|
69 | 76 | The socket object will be closed when [sw] finishes.
|
70 | 77 |
|
@@ -100,6 +107,8 @@ val getnameinfo : Eio.Net.Sockaddr.t -> (string * string)
|
100 | 107 | type _ Effect.t +=
|
101 | 108 | | Import_socket_stream :
|
102 | 109 | Switch.t * bool * Unix.file_descr -> [`Unix_fd | stream_socket_ty] r Effect.t (** See {!import_socket_stream} *)
|
| 110 | + | Import_socket_listening : |
| 111 | + Switch.t * bool * Unix.file_descr -> [`Unix_fd | listening_socket_ty] r Effect.t (** See {!import_socket_listening} *) |
103 | 112 | | Import_socket_datagram :
|
104 | 113 | Switch.t * bool * Unix.file_descr -> [`Unix_fd | datagram_socket_ty] r Effect.t (** See {!import_socket_datagram} *)
|
105 | 114 | | Socketpair_stream : Eio.Switch.t * Unix.socket_domain * int ->
|
|
0 commit comments