src/os/unix/ngx_channel.h - nginx-1.7.10

Data types defined

Macros defined

Source code


  1. /*
  2. * Copyright (C) Igor Sysoev
  3. * Copyright (C) Nginx, Inc.
  4. */


  5. #ifndef _NGX_CHANNEL_H_INCLUDED_
  6. #define _NGX_CHANNEL_H_INCLUDED_


  7. #include <ngx_config.h>
  8. #include <ngx_core.h>
  9. #include <ngx_event.h>


  10. typedef struct {
  11.      ngx_uint_t  command;
  12.      ngx_pid_t   pid;
  13.      ngx_int_t   slot;
  14.      ngx_fd_t    fd;
  15. } ngx_channel_t;


  16. ngx_int_t ngx_write_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size,
  17.     ngx_log_t *log);
  18. ngx_int_t ngx_read_channel(ngx_socket_t s, ngx_channel_t *ch, size_t size,
  19.     ngx_log_t *log);
  20. ngx_int_t ngx_add_channel_event(ngx_cycle_t *cycle, ngx_fd_t fd,
  21.     ngx_int_t event, ngx_event_handler_pt handler);
  22. void ngx_close_channel(ngx_fd_t *fd, ngx_log_t *log);


  23. #endif /* _NGX_CHANNEL_H_INCLUDED_ */