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:
Wez Furlong 2001-05-05 18:36:22 +00:00
parent d5763bbdcb
commit 3ffb8e3800
6 changed files with 322 additions and 504 deletions

View file

@ -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 */