« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 62 for sock (0.003 sec.)
例 | PHP 8.3 14203
例 目次 ストリームラッパーとして登録するクラスの例 例1 file_get_contents() を使って さまざまな場所からデータを取得する <?php /* /home/bar にあるローカルファイルを読み出す */ $localfile = file_get_contents ( "/home/bar/foo.txt" ); /* 上と同一 ... le.com/form_action.php に対して POST リクエストを送信 * ダミー値を持つ "foo" と "bar" というフォーム要素が含まれます。 */ $sock = fsockopen ( "ssl://secure.example.com" , 443 , $errno , $errstr , 30 ); if (! $sock ) die( " $errstr ( $errno )\n" ); $d ... ata = "foo=" . urlencode ( "Fooの値" ) . "&bar=" . urlencode ( "Barの値" ); fwrite ( $sock , "POST /form_action.php HTTP/1.0\r\n" ); fwrite ( $sock , "Host: secure.example.com\r\n" ); fwrite ( $sock , "Content-typ ... e: application/x-www-form-urlencoded\r\n" ); fwrite ( $sock , "Content-length: " . strlen ( $data ) . "\r\n" ); fwrite ( $sock , "Accept: */*\r\n" ); fwrite ( $sock , "\r\n" ); fwrit ...
https://man.mtool.work/php/8.3/stream.examples.html
例 | PHP 8.3 11472
例 例1 ソケットの例: 簡易 TCP/IP サーバー この例は、簡単な応答サーバーです。変数 address と port を設定と実行環境に合うように変更してください。 このサーバーに次のようなコマンドで接続することが可能です。 : telnet 192.168.1.53 10000 (ただし、 ... so we see what we're getting * as it comes in. */ ob_implicit_flush (); $address = '192.168.1.53' ; $port = 10000 ; if (( $sock = socket_create ( AF_INET , SOCK_STREAM , SOL_TCP )) === false ) { echo "socket_create() failed: reason: " . socket_strerr ... or ( socket_last_error ()) . "\n" ; } if ( socket_bind ( $sock , $address , $port ) === false ) { echo "socket_bind() failed: reason ... : " . socket_strerror ( socket_last_error ( $sock )) . "\n" ; } if ( socket_listen ( $sock , 5 ) === false ) { echo "socket_listen() ...
https://man.mtool.work/php/8.3/sockets.examples.html
socket_bind — ソケットに名前をバインドする | PHP 8.3 10230
socket_bind (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) socket_bind — ソケットに名前をバインドする 説明 function socket_bind ( Socket $socket , string $address , int $port = 0 ): bool address で指定した名前を socket で指定したソケットにバインドし ... ます。 これは、 socket_connect() あるいは socket_listen() を使用して接続を確立する前に行っておく必要があります。 パラメータ socket socket_creat ... e() で作成した Socket クラスのインスタンス。 address ソケットの種類が AF_INET の場合、 address はドットで 4 つに区切られた表記 (例: 127.0.0.1 ... )の IP アドレス。 ソケットの種類が AF_UNIX の場合、 address は Unix ドメインソケットのパス (例: /tmp/my.sock )。 port (オプション) パラメータ port は AF_INET ソケットにバインドする場合にのみ使用され、 接続を待ち受けるポートを指定 ...
https://man.mtool.work/php/8.3/function.socket-bind.html
stream_socket_pair — 接続された、区別できないソケットストリームの組を作成する |... 10157
stream_socket_pair (PHP 5 >= 5.1.0, PHP 7, PHP 8) stream_socket_pair — 接続された、区別できないソケットストリームの組を作成する 説明 function stream_socket_pair ( int $domain , int $type , int $protocol ): array | false stream_socket_pair() ... in 使用するプロトコルファミリー。 STREAM_PF_INET 、 STREAM_PF_INET6 あるいは STREAM_PF_UNIX type 使用する接続の型。 STREAM_SOCK_DGRAM 、 STREAM_SOCK_RAW 、 STREAM_SOCK_RDM 、 STREAM_SOCK_SEQPACKET あるいは STREAM_SOCK_STREAM protocol 使用するプロトコ ... の一覧 を参照ください。 戻り値 成功した場合に 2 つのソケットリソースの配列、失敗した場合に false を返します。 例 例1 stream_socket_pair() の例 この例では、プロセス間通信に stream_socket_pair() を使用する基本的な方法を示します。 <?php $sockets = stream ... _socket_pair ( STREAM_PF_UNIX , STREAM_SOCK_STREAM , STREAM_IPPROTO_IP ); $pid = pcntl_fork (); if ( $pid == - 1 ) { die( 'フォー ...
https://man.mtool.work/php/8.3/function.stream-socket-pair.html
The Swoole\Event class | PHP 8.3 8915
The Swoole\Event class (PECL swoole >= 1.9.0) はじめに The Swoole extension provides low-level interfaces to directly manipulate the underlying epoll/kqueue/poll/select event loop. It allows adding sockets created by other extensions or PHP ... 's stream/socket extensions to Swoole's EventLoop. 注意 : The Event module is low-level, being a basic encapsulation of epoll. Users shou ... mer::after Deferred execution functions set via Event::defer Periodic callback functions set via Event::cycle Swoole Event Socket Type fd int File descriptors, including Swoole\Client->$sock, Swoole\Process->$pipe, or any other file descriptor (fd). ... stream resource resource Resources created by stream_socket_client/fsockopen. socket resource resource Resources created by socket_create from the sockets extension require the --e ...
https://man.mtool.work/php/8.3/class.swoole-event.html
新しいグローバル定数 | PHP 8.3 8582
新しいグローバル定数 PHP コア PHP_OUTPUT_HANDLER_PROCESSED PHP_SBINDIR cURL CURL_HTTP_VERSION_3 CURL_HTTP_VERSION_3ONLY CURLOPT_TCP_KEEPCNT CURLOPT_PREREQFUNCTION CURL_PREREQFUNC_OK CURL_PREREQFUNC_ABORT CURLOPT_SERVER_RESPONSE_TIMEOUT CURL ... Dのみ) P_SID (NetBSD/FreeBSDのみ) P_JAILID (FreeBSDのみ) PGSQL PGSQL_TUPLES_CHUNK POSIX POSIX_SC_CHILD_MAX POSIX_SC_CLK_TCK Sockets サポートされている場合、次のソケットオプションが新たに定義されます: SO_EXCLUSIVEADDRUSE (Windowsのみ) SOCK_CONN_DGRAM ( ... NetBSDのみ) SOCK_DCCP (NetBSDのみ) TCP_SYNCNT (Linuxのみ) SO_EXCLBIND (Solaris/Illumosのみ) SO_NOSIGPIPE (macOSおよびFreeBSD) SO_LINGER_S ... (FreeBSD/NetBSD/OpenBSDのみ) IP_PORTRANGE_HIGH (FreeBSD/NetBSD/OpenBSDのみ) IP_PORTRANGE_LOW (FreeBSD/NetBSD/OpenBSDのみ) SOCK_NONBLOCK SOCK_CLOEXEC SO_BINDTOIFINDEX Sodium SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES SODIUM_CRYPTO_AEAD_AEGIS128L_NSECBYTES ...
https://man.mtool.work/php/8.3/migration84.constants.html
EventBufferEvent::connect — Connect buffer event's file descriptor to given add... 8496
EventBufferEvent::connect (PECL event >= 1.2.6-beta) EventBufferEvent::connect — Connect buffer event's file descriptor to given address or UNIX socket 説明 public function EventBufferEvent::connect ( string $addr ): bool Connect buffer eve ... nt's file descriptor to given address(optionally with port), or a UNIX domain socket. If socket is not assigned to the buffer event, this function allocates a new socket and makes it non-blocking internall ... nt::connectHost() method. パラメータ addr Should contain an IP address with optional port number, or a path to UNIX domain socket. Recognized formats are: [IPv6Address]:port [IPv6Address] IPv6Address IPv4Address:port IPv4Address unix:path Note, 'unix ... ); exit( "Done\n" ); } } $base = new EventBase (); echo "step 1\n" ; $bev = new EventBufferEvent ( $base , /* use internal socket */ NULL , EventBufferEvent :: OPT_CLOSE_ON_FREE | EventBufferEvent :: OPT_DEFER_CALLBACKS ); if (! $bev ) { exit( "Faile ...
https://man.mtool.work/php/8.3/eventbufferevent.connect.html
socket_create — ソケット(通信時の終端)を作成する | PHP 8.3 8409
socket_create (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) socket_create — ソケット(通信時の終端)を作成する 説明 function socket_create ( int $domain , int $type , int $protocol ): Socket | false 通信のエンドポイント(終端)と呼ばれることもある Sock ... でよく使われます。 type type パラメータは、 ソケットが利用する通信方式を指定します。 利用できるソケットのタイプ タイプ 説明 SOCK_STREAM このタイプでは、時系列的、高信頼性、全二重、接続型のバイトストリームが利用できます。 帯域外のデータ転送メカニズムが ... サポートされている場合もあります。 TCP プロトコルは、このソケットタイプに基づきます。 SOCK_DGRAM このタイプでは、データグラム(非接続型で、信頼性の高くない 最大長が固定のメッセージ) がサポートされます。 UDP プロトコ ... ルは、このソケットタイプに基づきます。 SOCK_SEQPACKET このタイプでは、時系列的な、信頼性のある、 双方向の接続指向型の、最大長が固定のデータグラム転送が利用できます。 ...
https://man.mtool.work/php/8.3/function.socket-create.html
socket_sendto — 接続しているかどうかによらずソケットにメッセージを送信する | PH... 8409
socket_sendto (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) socket_sendto — 接続しているかどうかによらずソケットにメッセージを送信する 説明 function socket_sendto ( Socket $socket , string $data , int $length , int $flags , string $address , ? int ... $port = null ): int | false 関数 socket_sendto() は、 アドレス address の port を使用し、 data からソケット socket に length バイトのデータを送信します。 パラメ ... ータ socket socket_create() で作成した Socket クラスのインスタンス。 data 送信するデータが、バッファ data から取り出されます。 lengt ... 用します。 address リモートホストの IP アドレス。 port port は、 データの送信先となるリモートホストのポート番号です。 戻り値 socket_sendto() は、リモートホストに送信したバイト数を返します。 エラーが発生した場合は false を返します。 変更履歴 バージョン ...
https://man.mtool.work/php/8.3/function.socket-sendto.html
Swoole\Server::__construct — Construct a Swoole server. | PHP 8.3 8409
Swoole\Server::__construct (PECL swoole >= 1.9.0) Swoole\Server::__construct — Construct a Swoole server. 説明 public function Swoole\Server::__construct ( string $host , int $port = ? , int $mode = ? , int $sock_type = ? ) パラメータ host ... port mode sock_type 他のマニュアルの関連ページ DuckDB MySQL Import DuckDB Troubleshooting Quack Python asyncio-stream Docker Docker EE Do ...
https://man.mtool.work/php/8.3/swoole-server.construct.html
PREV 1 2 3 4 5 6 7 NEXT