1
  X   ˆl–Ãa¾”ªi?u8 ¸Ûw˜´o“þ\}¥œp,Çbz7Ú•i½š¿çÄ{‹„„-i[D<†ªoZƒ›Ù«Å665_‹I|¥Žƒî4ÃVŸÄÃ ™    ‹      …TmoÚ@þ/÷ùD4A5•|òIÊCeU;íC`�¥B	¥¬Óþûl_.9²Š!Ù¾Çöã—»ßâ˜íË¼ØŠ~WŠe¾ÎD_,³Ãâgç±R”ÅË~‘})ŠÚk½ýo¢ÓñÜ¹_xùö�í·éÚ+æe¶?¦óuæý(6ž	x(Åw)¶é†ýQÜ¤»]¾]¡&|ÀŸœ Ld ÈWðªŒ<ËBZâW#V_x0s Oèû¤¨v S€©í!´WC{áq`ì‘±ôQÉà…Ø�¼RŒý!„Ÿe®‰u@ŸçÊrHz�È`AxX)ŠvÍÅRŠØž¡õ¤å=À3s	éS*Œ¦½Š¼u™ÑQF’fÕO þ¨é¸"�)#ƒÎÈ¥ry	èGm¸q‰ågL°$ÌJQ4$Éî\}­ŠÏIMäÀ�	Á§â– ÄGïµ12†ø÷ —Ž�b53ñ±	ÔW[�¦nÇóôNù9¶jLØhdÊ-Ì˜‰¢�²~SSSb+î”Þ^Èƒ#¤DDçÆ ØLzè¯fvÜ²9wû0p²q/YZ¹	M¢‰ºAÿÍÅ¨h¸�Ø8i¨9¡?EŠØúÉÀ´†z•+ùKñFqWâzçJ9{t+7;ÔÈìJ	�®«œeàž±#ž¬ÿéf«R»y'u¦¡ƒn¦PÑ¶u]¹eFIÅhnøŽÙ>Ø[ÛRó±µzgP9(ûŽ_í3ÜòfïÖO'g¨é4pªg§vØú�>a]æM³Úzôn¦U;SÓ–óòÌÒ]à”ÒM£�¸ž¹fÍNÚiakh%©ó#çq¨/ïüw·•ßµO­™ÐC=bIüùŽ;”       ˆÂ�þB gÒ”² …}ÿçÇƒh¹ÆÄÃ      256
  5   	ˆl–ßi~” T¾R( 	ÅŒ¹pM)‹Fÿ�þB gàá²ÊçÈƒh¹ÇÅÄ      	256
  7   ˆl–ßi~” T¾R( 	Å�à¦-ÿ‘äÇò 8à_ œŽ7ŸÉƒh¹ÈÆÅ      0
  A   ˆl–Ãa¾”Ò~êq@µp,Üeµ1hß�þDór¬ã€�¹y¶‚@?Ê„e¿É_ˆI|¥�+y,ÈÇ (_    /*
   +----------------------------------------------------------------------+
   | PHP Version 7                                                        |
   +----------------------------------------------------------------------+
   | Copyright (c) 1997-2018 The PHP Group                                |
   +----------------------------------------------------------------------+
   | This source file is subject to version 3.01 of the PHP license,      |
   | that is bundled with this package in the file LICENSE, and is        |
   | available through the world-wide-web at the following url:           |
   | http://www.php.net/license/3_01.txt                                  |
   | If you did not receive a copy of the PHP license and are unable to   |
   | obtain it through the world-wide-web, please send a note to          |
   | license@php.net so we can mail you a copy immediately.               |
   +----------------------------------------------------------------------+
   | Author: Stig Venaas <venaas@uninett.no>                              |
   +----------------------------------------------------------------------+
 */

/* $Id$ */

#ifndef _PHP_NETWORK_H
#define _PHP_NETWORK_H

#include <php.h>

#ifdef PHP_WIN32
# include "win32/inet.h"
#else
# undef closesocket
# define closesocket close
# include <netinet/tcp.h>
#endif

#ifndef HAVE_SHUTDOWN
#undef shutdown
#define shutdown(s,n)	/* nothing */
#endif

#ifdef PHP_WIN32
# ifdef EWOULDBLOCK
#  undef EWOULDBLOCK
# endif
# ifdef EINPROGRESS
#  undef EINPROGRESS
# endif
# define EWOULDBLOCK WSAEWOULDBLOCK
# define EINPROGRESS	WSAEWOULDBLOCK
# define fsync _commit
# define ftruncate(a, b) chsize(a, b)
#endif /* defined(PHP_WIN32) */

#ifndef EWOULDBLOCK
# define EWOULDBLOCK EAGAIN
#endif

#ifdef PHP_WIN32
#define php_socket_errno() WSAGetLastError()
#else
#define php_socket_errno() errno
#endif

/* like strerror, but caller must efree the returned string,
 * unless buf is not NULL.
 * Also works sensibly for win32 */
BEGIN_EXTERN_C()
PHPAPI char *php_socket_strerror(long err, char *buf, size_t bufsize);
PHPAPI zend_string *php_socket_error_str(long err);
END_EXTERN_C()

#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif

#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif

#ifdef HAVE_GETHOSTBYNAME_R
#include <netdb.h>
#endif

/* These are here, rather than with the win32 counterparts above,
 * since <sys/socket.h> defines them. */
#ifndef SHUT_RD
# define SHUT_RD 0
# define SHUT_WR 1
# define SHUT_RDWR 2
#endif

#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif

#ifdef HAVE_STDDEF_H
#include <stddef.h>
#endif

#ifdef PHP_WIN32
typedef SOCKET php_socket_t;
#else
typedef int php_socket_t;
#endif

#ifdef PHP_WIN32
# define SOCK_ERR INVALID_SOCKET
# define SOCK_CONN_ERR SOCKET_ERROR
# define SOCK_RECV_ERR SOCKET_ERROR
#else
# define SOCK_ERR -1
# define SOCK_CONN_ERR -1
# define SOCK_RECV_ERR -1
#endif

#define STREAM_SOCKOP_NONE                (1 << 0)
#define STREAM_SOCKOP_SO_REUSEPORT        (1 << 1)
#define STREAM_SO