mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-15 16:38:54 +00:00
- 0 => SOL_TCP, fixes #26486.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@146522 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
e82fccf51c
commit
ff3b7e87ff
2 changed files with 5 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.4 $ -->
|
||||
<!-- $Revision: 1.5 $ -->
|
||||
<!-- splitted from ./en/functions/sockets.xml, last change in rev 1.8 -->
|
||||
<refentry id="function.socket-strerror">
|
||||
<refnamediv>
|
||||
|
@ -28,7 +28,7 @@
|
|||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
<?php
|
||||
if (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, 0))) {
|
||||
if (false == ($socket = @socket_create(AF_INET, SOCK_STREAM, SOL_TCP))) {
|
||||
echo "socket_create() failed: reason: " . socket_strerror(socket_last_error()) . "\n";
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.14 $ -->
|
||||
<!-- $Revision: 1.15 $ -->
|
||||
<reference id="ref.sockets">
|
||||
<title>Socket functions</title>
|
||||
<titleabbrev>Sockets</titleabbrev>
|
||||
|
@ -118,7 +118,7 @@ ob_implicit_flush();
|
|||
$address = '192.168.1.53';
|
||||
$port = 10000;
|
||||
|
||||
if (($sock = socket_create(AF_INET, SOCK_STREAM, 0)) < 0) {
|
||||
if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP)) < 0) {
|
||||
echo "socket_create() failed: reason: " . socket_strerror($sock) . "\n";
|
||||
}
|
||||
|
||||
|
@ -190,7 +190,7 @@ $service_port = getservbyname('www', 'tcp');
|
|||
$address = gethostbyname('www.example.com');
|
||||
|
||||
/* Create a TCP/IP socket. */
|
||||
$socket = socket_create(AF_INET, SOCK_STREAM, 0);
|
||||
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
|
||||
if ($socket < 0) {
|
||||
echo "socket_create() failed: reason: " . socket_strerror($socket) . "\n";
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue