Commit 0622ba44 authored by Niels Möller's avatar Niels Möller
Browse files

* src/io.h (local_info): New class.

Rev: src/io.h:1.66
parent ebc56683
...@@ -185,7 +185,23 @@ void init_consuming_read(struct io_consuming_read *self, ...@@ -185,7 +185,23 @@ void init_consuming_read(struct io_consuming_read *self,
; The port number here is always in host byte order ; The port number here is always in host byte order
(port . UINT32))) */ (port . UINT32))) */
/* Returned by listen. And also by connect, so this is an improper name. */ /* Used for listening and connecting to local sockets.
* Both strings have to be NUL-terminated. */
/* GABA:
(class
(name local_info)
(vars
(directory string)
(name string)))
*/
struct local_info *
make_local_info(struct lsh_string *directory,
struct lsh_string *name);
/* Returned by listen. And also by connect, so this is an improper name.
* Functions related to AF_UNIX sockets leave the peer field as NULL. */
/* GABA: /* GABA:
(class (class
(name listen_value) (name listen_value)
...@@ -311,15 +327,13 @@ io_listen(struct io_backend *b, ...@@ -311,15 +327,13 @@ io_listen(struct io_backend *b,
struct lsh_fd * struct lsh_fd *
io_listen_local(struct io_backend *b, io_listen_local(struct io_backend *b,
struct lsh_string *directory, struct local_info *info,
struct lsh_string *name,
struct io_callback *callback, struct io_callback *callback,
struct exception_handler *e); struct exception_handler *e);
struct lsh_fd * struct lsh_fd *
io_connect_local(struct io_backend *b, io_connect_local(struct io_backend *b,
struct lsh_string *directory, struct local_info *info,
struct lsh_string *name,
struct command_continuation *c, struct command_continuation *c,
struct exception_handler *e); struct exception_handler *e);
...@@ -328,6 +342,12 @@ make_listen_callback(struct io_backend *backend, ...@@ -328,6 +342,12 @@ make_listen_callback(struct io_backend *backend,
struct command_continuation *c, struct command_continuation *c,
struct exception_handler *e); struct exception_handler *e);
#if 0
struct io_callback *
make_listen_callback_no_peer(struct io_backend *backend,
struct command_continuation *c);
#endif
struct lsh_fd *io_read_write(struct lsh_fd *fd, struct lsh_fd *io_read_write(struct lsh_fd *fd,
struct io_callback *read, struct io_callback *read,
UINT32 block_size, UINT32 block_size,
...@@ -362,12 +382,14 @@ io_read_file(struct io_backend *backend, ...@@ -362,12 +382,14 @@ io_read_file(struct io_backend *backend,
const char *fname, const char *fname,
struct exception_handler *e); struct exception_handler *e);
#if 0
struct lsh_fd * struct lsh_fd *
io_read_user_file(struct io_backend *backend, io_read_user_file(struct io_backend *backend,
const char *fname, const char *fname,
uid_t uid, int secret, uid_t uid, int secret,
const struct exception **x, const struct exception **x,
struct exception_handler *e); struct exception_handler *e);
#endif
int int
lsh_make_pipe(int *fds); lsh_make_pipe(int *fds);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment