nginx/src/os/unix/ngx_socket.h


/*
 * Copyright (C) Igor Sysoev
 * Copyright (C) Nginx, Inc.
 */


#ifndef _NGX_SOCKET_H_INCLUDED_
#define _NGX_SOCKET_H_INCLUDED_


#include <ngx_config.h>


#define NGX_WRITE_SHUTDOWN
#define NGX_READ_SHUTDOWN
#define NGX_RDWR_SHUTDOWN

ngx_socket_t;

#define ngx_socket
#define ngx_socket_n


#if (NGX_HAVE_FIONBIO)

int ngx_nonblocking(ngx_socket_t s);
int ngx_blocking(ngx_socket_t s);

#define ngx_nonblocking_n
#define ngx_blocking_n

#else

#define ngx_nonblocking
#define ngx_nonblocking_n

#define ngx_blocking
#define ngx_blocking_n

#endif

#if (NGX_HAVE_FIONREAD)

#define ngx_socket_nread(s, n)
#define ngx_socket_nread_n

#endif

int ngx_tcp_nopush(ngx_socket_t s);
int ngx_tcp_push(ngx_socket_t s);

#if (NGX_LINUX)

#define ngx_tcp_nopush_n
#define ngx_tcp_push_n

#else

#define ngx_tcp_nopush_n
#define ngx_tcp_push_n

#endif


#define ngx_shutdown_socket
#define ngx_shutdown_socket_n

#define ngx_close_socket
#define ngx_close_socket_n


#endif /* _NGX_SOCKET_H_INCLUDED_ */