Mailinglisten-Archive |
> Hallo,
>
> hat der HTTP-fopen-Wrapper einen automatischen Timeout?
>
> Danke!
>
> Ulf
####################################
file.c
/* {{{ proto bool socket_set_timeout(int socket_descriptor, int seconds, int
microseconds)
Set timeout on socket read to seconds + microseonds */
PHP_FUNCTION(socket_set_timeout)
{
#if HAVE_SYS_TIME_H
zval **socket, **seconds, **microseconds;
int type;
void *what;
int socketd = 0;
struct timeval t;
if (ZEND_NUM_ARGS() < 2 || ZEND_NUM_ARGS() > 3 ||
zend_get_parameters_ex(ZEND_NUM_ARGS(), &socket, &seconds,
µseconds)==FAILURE) {
WRONG_PARAM_COUNT;
}
###############################
fsock.c
static void php_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) {
pval **args[5];
int *sock=emalloc(sizeof(int));
int *sockp;
int arg_count=ZEND_NUM_ARGS();
int socketd = -1;
unsigned char udp = 0;
struct timeval timeout = { 60, 0 };
#################################
scheint so, dass php einen timeout von 60 sekunden hat ...
oder bin ich zu blöd c source zu lesen ?
kiri
php::bar PHP Wiki - Listenarchive