mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Nuke buffering from php_streams, move connect_nonb() from fsock.c to network.c
and rename to php_connect_nonb(). Use php_connect_nonb() instead of connect() in php_hostconnect() -> timeouts should now work in php_hostconnect(). sock streams abstraction now uses php_sockbuf as the "abstract" pointer.
This commit is contained in:
parent
d5763bbdcb
commit
3ffb8e3800
6 changed files with 322 additions and 504 deletions
|
@ -20,7 +20,27 @@
|
|||
#ifndef _PHP_NETWORK_H
|
||||
#define _PHP_NETWORK_H
|
||||
|
||||
#ifdef PHP_WIN32
|
||||
# ifndef WINNT
|
||||
# define WINNT 1
|
||||
# endif
|
||||
# undef FD_SETSIZE
|
||||
# include "arpa/inet.h"
|
||||
# define socklen_t unsigned int
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETINET_IN_H
|
||||
# include <netinet/in.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SYS_SOCKET_H
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
int php_hostconnect(char *host, unsigned short port, int socktype, int timeout);
|
||||
PHPAPI int php_connect_nonb(int sockfd, struct sockaddr *addr, socklen_t addrlen, struct timeval *timeout);
|
||||
|
||||
#endif /* _PHP_NETWORK_H */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue