mirror of
https://github.com/php/php-src.git
synced 2024-11-24 02:15:04 +08:00
Avoid use of random ports in some socket tests
This commit is contained in:
parent
a023eb3967
commit
d6d9024cb8
@ -14,9 +14,8 @@ fa@php.net
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rand = rand(1,999);
|
||||
$s_c = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
$s_bind = socket_bind($s_c, '0.0.0.0', 31330+$rand);
|
||||
$s_bind = socket_bind($s_c, '0.0.0.0');
|
||||
var_dump($s_bind);
|
||||
|
||||
// Connect to destination address
|
||||
|
@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
ext/sockets - socket_getsockname - basic test
|
||||
ext/sockets - socket_getpeername - basic test
|
||||
--CREDITS--
|
||||
Florian Anderiasch
|
||||
fa@php.net
|
||||
@ -11,9 +11,8 @@ fa@php.net
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rand = rand(1,999);
|
||||
$s_c = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
$s_bind = socket_bind($s_c, '0.0.0.0', 31330+$rand);
|
||||
$s_bind = socket_bind($s_c, '0.0.0.0');
|
||||
var_dump($s_bind);
|
||||
|
||||
// Connect to destination address
|
||||
|
@ -11,9 +11,8 @@ fa@php.net
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rand = rand(1,999);
|
||||
$s_c = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
$s_bind = socket_bind($s_c, '0.0.0.0', 31330+$rand);
|
||||
$s_bind = socket_bind($s_c, '0.0.0.0');
|
||||
var_dump($s_bind);
|
||||
|
||||
// Connect to destination address
|
||||
|
@ -8,8 +8,7 @@ ext/sockets - socket_send - test with incorrect parameters
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rand = rand(1,999);
|
||||
$s_c = socket_create_listen(31330+$rand);
|
||||
$s_c = socket_create_listen(0);
|
||||
$s_w = socket_send($s_c, "foo", -1, MSG_OOB);
|
||||
socket_close($s_c);
|
||||
?>
|
||||
|
@ -8,8 +8,7 @@ ext/sockets - socket_sendto - test with incorrect parameters
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rand = rand(1,999);
|
||||
$s_c = socket_create_listen(31330+$rand);
|
||||
$s_c = socket_create_listen(0);
|
||||
$s_w = socket_sendto($s_c, "foo", -1, MSG_OOB, '127.0.0.1');
|
||||
socket_close($s_c);
|
||||
?>
|
||||
|
@ -11,11 +11,10 @@ fa@php.net
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$rand = rand(1,999);
|
||||
$s_c_l = socket_create_listen(31330+$rand);
|
||||
$s_c_l = socket_create_listen(0);
|
||||
socket_set_nonblock($s_c_l);
|
||||
var_dump($s_c_l);
|
||||
#socket_accept($s_c_l);
|
||||
//socket_accept($s_c_l);
|
||||
socket_close($s_c_l);
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
Loading…
Reference in New Issue
Block a user