Results of 1 - 10 of about 16 for nonblock (0.001 sec.)
- socket_set_nonblock — ソケットリソースを非ブロックモードに設定する | PHP 8.3 15110
- socket_set_nonblock (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) socket_set_nonblock — ソケットリソースを非ブロックモードに設定する 説明 function socket_set_nonblock ( Socket $socket ): bool socket_set_nonblock() 関数は、 socket パラメータで指定し
... たソケットに O_NONBLOCK フラグを設定します。 受信や送信、接続、待機といった操作を非ブロックモードのソケットに対して行うと、 その処理が完了するか何 ... 0.0 socket は、 Socket クラスのインスタンスになりました。 これより前のバージョンでは、リソース型でした。 例 例1 socket_set_nonblock() の例 <?php $socket = socket_create_listen ( 1223 ); socket_set_nonblock ( $socket ); socket_accept ( $socket ); ?> この例 ... は、すべてのインターフェイス上でポート 1223 を待ち受けるソケットを作成し、それを O_NONBLOCK モードに設定します。 socket_accept() は、 その時点で待機中の接続がない場合はすぐに失敗します。 参考 socket_set_block() - ソ ...
-
https://man.mtool.work/php/8.3/function.socket-set-nonblock.html
- socket_set_block — ソケットのブロッキングモードを設定する | PHP 8.3 9322
- socket_set_block (PHP 4 >= 4.2.0, PHP 5, PHP 7, PHP 8) socket_set_block — ソケットのブロッキングモードを設定する 説明 function socket_set_block ( Socket $socket ): bool socket_set_block() 関数は、 socket パラメータで指定したソケットから O_NONBLOCK
... れを O_BLOCK モードに設定します。 socket_accept() は、 接続が受け付けられるまで処理を停止して待ち続けます。 参考 socket_set_nonblock() - ソケットリソースを非ブロックモードに設定する socket_set_option() - ソケットのオプションを設定する 他のマニュアルの関連 ...
-
https://man.mtool.work/php/8.3/function.socket-set-block.html
- The EventBase class | PHP 8.3 9010
- The EventBase class (PECL event >= 1.2.6-beta) はじめに EventBase class represents libevent's event base structure. It holds a set of events and can poll to determine which events are active. Each event base has a method , or a backend that
... will lead to unpredictable results! クラス概要 final class EventBase { /* 定数 */ const int LOOP_ONCE = 1 ; const int LOOP_NONBLOCK = 2 ; const int NOLOCK = 1 ; const int STARTUP_IOCP = 4 ; const int NO_CACHE_TIME = 8 ; const int EPOLL_USE_CHANGELIST = 1 ... "block until libevent has an active event, then exit once all active events have had their callbacks run". EventBase::LOOP_NONBLOCK Flag used with EventBase::loop() method which means: "do not block: see which events are ready now, run the callbacks of t ...
-
https://man.mtool.work/php/8.3/class.eventbase.html
- dio_open — C ライブラリの入出力ストリーム関数が許すよりも低レベルでファイルをオ... 8906
- dio_open (PHP 4 >= 4.2.0, PHP 5 < 5.1.0) dio_open — C ライブラリの入出力ストリーム関数が許すよりも低レベルでファイルをオープンする (必要ならファイルを作成する) 説明 function dio_open ( string $filename , int $flags , int $mode = 0 ): resour
... ス用にオープンされている場合、ファイルの長さをゼロに切り詰めます。 O_APPEND - 書き込み時は、ファイルの終端に 追記します。 O_NONBLOCK - 非ブロッキングモードを指定します。 O_NOCTTY - TTY デバイスファイルをオープンするときに、 オープンしたファイルをプロセスが ... false を返します。 例 例1 ファイルディスクリプタをオープンする <?php $fd = dio_open ( '/dev/ttyS0' , O_RDWR | O_NOCTTY | O_NONBLOCK ); dio_close ( $fd ); ?> 参考 dio_close() - fd で指定したファイルディスクリプタを閉じる 他のマニュアルの関連ページ Linux J ...
-
https://man.mtool.work/php/8.3/function.dio-open.html
- 定義済み定数 | PHP 8.3 8404
- 定義済み定数 以下の定数が定義されています。 この関数の拡張モジュールが PHP 組み込みでコンパイルされているか、 実行時に動的にロードされている場合のみ使用可能です。 F_DUPFD ( int ) F_GETFD ( int ) F_GETFL ( int ) F_GETLK ( int ) F_GETOWN ( in
... int ) F_WRLCK ( int ) O_APPEND ( int ) O_ASYNC ( int ) O_CREAT ( int ) O_EXCL ( int ) O_NDELAY ( int ) O_NOCTTY ( int ) O_NONBLOCK ( int ) O_RDONLY ( int ) O_RDWR ( int ) O_SYNC ( int ) O_TRUNC ( int ) O_WRONLY ( int ) S_IRGRP ( int ) S_IROTH ( int ) S_ ...
-
https://man.mtool.work/php/8.3/dio.constants.html
- dio_tcsetattr — シリアルポートの端末属性とボーレートを設定する | PHP 8.3 8300
- dio_tcsetattr (PHP 4 >= 4.3.0, PHP 5 < 5.1.0) dio_tcsetattr — シリアルポートの端末属性とボーレートを設定する 説明 function dio_tcsetattr ( resource $fd , array $options ): bool dio_tcsetattr() は、オープンした fd の端末属性とボーレートを指定
... 値 値を返しません。 例 例1 シリアルポートのボーレートを設定する <?php $fd = dio_open ( '/dev/ttyS0' , O_RDWR | O_NOCTTY | O_NONBLOCK ); dio_fcntl ( $fd , F_SETFL , O_SYNC ); dio_tcsetattr ( $fd , array( 'baud' => 9600 , 'bits' => 8 , 'stop' => 1 , 'parity ...
-
https://man.mtool.work/php/8.3/function.dio-tcsetattr.html
- 例 | PHP 8.3 8196
- 例 例1 タイマーのサンプル <?php // タイマーを作り、2 秒後に起動します $w1 = new EvTimer ( 2 , 0 , function () { echo "2 seconds elapsed\n" ; }); // タイマーを作って 2 秒後に起動させ、その後は // 手で止めるまで 1 秒おきに繰り返します $w2 = n
... 拡張モジュールは、 // EINPROGRESS や EAGAIN/EWOULDBLOCK などに対して warning を発光します error_reporting ( E_ERROR ); $e_nonblocking = array ( /*EAGAIN or EWOULDBLOCK*/ 11 , /*EINPROGRESS*/ 115 ); // WWW サービス用のポートを取得します $service_port = g ... ( $socket === FALSE ) { echo "socket_create() failed: reason: " . socket_strerror ( socket_last_error ()) . "\n" ; } // O_NONBLOCK フラグを立てます socket_set_nonblock ( $socket ); // タイムアウト時に終了させます $timeout_watcher = new EvTimer ( 10.0 , ... クエストを作ります $write_watcher = new EvIo ( $socket , Ev :: WRITE , function ( $w ) use ( $socket , $timeout_watcher , $e_nonblocking ) { // タイムアウトのウォッチャーを止めます $timeout_watcher -> stop (); // 書き込みのウォッチャーを止めます $w -> stop ...
-
https://man.mtool.work/php/8.3/ev.examples.html
- EventHttp::accept — Makes an HTTP server accept connections on the specified so... 8092
- EventHttp::accept (PECL event >= 1.2.6-beta) EventHttp::accept — Makes an HTTP server accept connections on the specified socket stream or resource 説明 public function EventHttp::accept ( mixed $socket ): bool Makes an HTTP server accept c
... _bind ( $socket [ $i ], $ip , $port )) { exit( "socket_bind failed\n" ); } socket_listen ( $socket [ $i ], 0 ); socket_set_nonblock ( $socket [ $i ]); if (! $http -> accept ( $socket [ $i ])) { echo "Accept failed\n" ; exit( 1 ); } ++ $i ; } $http -> set ...
-
https://man.mtool.work/php/8.3/eventhttp.accept.html
- dio_fcntl — fd について C ライブラリの fcntl を実行する | PHP 8.3 8092
- dio_fcntl (PHP 4 >= 4.2.0, PHP 5 < 5.1.0) dio_fcntl — fd について C ライブラリの fcntl を実行する 説明 function dio_fcntl ( resource $fd , int $cmd , mixed $args = ? ): mixed 関数 dio_fcntl() は、ファイルディスクリプタ fd において cmd で指定
... し、それを返します。 F_SETFL - ファイルディスクリプタのフラグを args で指定した値に設定します。指定できる値は O_APPEND 、 O_NONBLOCK あるいは O_ASYNC のいずれかです。 O_ASYNC を使用するには、 PCNTL 拡張モジュールが必要です。 args args は連想配列で、 cmd が ...
-
https://man.mtool.work/php/8.3/function.dio-fcntl.html
- socket_accept — ソケットへの接続を許可する | PHP 8.3 8092
- socket_accept (PHP 4 >= 4.1.0, PHP 5, PHP 7, PHP 8) socket_accept — ソケットへの接続を許可する 説明 function socket_accept ( Socket $socket ): Socket | false socket_create() を使用してソケット socket を作成した後、 socket_bind() で名前に関連
... 続待ちがない場合、 socket_accept() は接続が存在するまでブロックされます。 socket が socket_set_blocking() または socket_set_nonblock() により非ブロックモードで 作成された場合、 false が返されます。 socket_accept() により返された Socket クラスのインスタンス ...
-
https://man.mtool.work/php/8.3/function.socket-accept.html