summaryrefslogtreecommitdiff
path: root/ext/sockets
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-07-03 12:48:00 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-07-03 12:48:00 +0200
commit057012f241590aef256cf0dd6ce9db5568a77017 (patch)
tree2e2848bd5443de5223293c7c14fc1cea1b9ec65e /ext/sockets
parent97b84a36945f1ec648a9d76645d9de40fc4640b6 (diff)
parentd6d9024cb865ea2bcab75bbacb47d601cb72033b (diff)
downloadphp-git-057012f241590aef256cf0dd6ce9db5568a77017.tar.gz
Merge branch 'PHP-7.4'
Diffstat (limited to 'ext/sockets')
-rw-r--r--ext/sockets/tests/socket_bind.phpt3
-rw-r--r--ext/sockets/tests/socket_getpeername.phpt5
-rw-r--r--ext/sockets/tests/socket_getsockname.phpt3
-rw-r--r--ext/sockets/tests/socket_send_params.phpt3
-rw-r--r--ext/sockets/tests/socket_sendto_params.phpt3
-rw-r--r--ext/sockets/tests/socket_set_nonblock.phpt5
6 files changed, 8 insertions, 14 deletions
diff --git a/ext/sockets/tests/socket_bind.phpt b/ext/sockets/tests/socket_bind.phpt
index 8417801c37..908979e2bd 100644
--- a/ext/sockets/tests/socket_bind.phpt
+++ b/ext/sockets/tests/socket_bind.phpt
@@ -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
diff --git a/ext/sockets/tests/socket_getpeername.phpt b/ext/sockets/tests/socket_getpeername.phpt
index dc00d44641..a4a4d45923 100644
--- a/ext/sockets/tests/socket_getpeername.phpt
+++ b/ext/sockets/tests/socket_getpeername.phpt
@@ -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
diff --git a/ext/sockets/tests/socket_getsockname.phpt b/ext/sockets/tests/socket_getsockname.phpt
index 9039acc555..a52ce47ac5 100644
--- a/ext/sockets/tests/socket_getsockname.phpt
+++ b/ext/sockets/tests/socket_getsockname.phpt
@@ -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
diff --git a/ext/sockets/tests/socket_send_params.phpt b/ext/sockets/tests/socket_send_params.phpt
index 44be133bf9..cc05288eb9 100644
--- a/ext/sockets/tests/socket_send_params.phpt
+++ b/ext/sockets/tests/socket_send_params.phpt
@@ -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);
?>
diff --git a/ext/sockets/tests/socket_sendto_params.phpt b/ext/sockets/tests/socket_sendto_params.phpt
index f232258ec0..e4808a93ee 100644
--- a/ext/sockets/tests/socket_sendto_params.phpt
+++ b/ext/sockets/tests/socket_sendto_params.phpt
@@ -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);
?>
diff --git a/ext/sockets/tests/socket_set_nonblock.phpt b/ext/sockets/tests/socket_set_nonblock.phpt
index 29c9372ef8..88f29d928e 100644
--- a/ext/sockets/tests/socket_set_nonblock.phpt
+++ b/ext/sockets/tests/socket_set_nonblock.phpt
@@ -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--