Skip to content

Commit c8ca5cf

Browse files
committed
documentation updates
1 parent 3b3fddc commit c8ca5cf

File tree

1 file changed

+50
-2
lines changed

1 file changed

+50
-2
lines changed

src/core/Constant.php

Lines changed: 50 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,70 @@ class Constant
8989

9090
public const OPTION_DNS_SERVER = 'dns_server';
9191

92+
/**
93+
* Socket DNS timeout in seconds.
94+
*/
9295
public const OPTION_SOCKET_DNS_TIMEOUT = 'socket_dns_timeout';
9396

97+
/**
98+
* Default socket connect timeout in seconds.
99+
*/
94100
public const OPTION_SOCKET_CONNECT_TIMEOUT = 'socket_connect_timeout';
95101

102+
/**
103+
* Default socket write timeout in seconds.
104+
*
105+
* This one works the same as option "socket_send_timeout", but has higher priority.
106+
*
107+
* @see \Swoole\Constant::OPTION_SOCKET_SEND_TIMEOUT
108+
*/
96109
public const OPTION_SOCKET_WRITE_TIMEOUT = 'socket_write_timeout';
97110

111+
/**
112+
* Default socket write timeout in seconds.
113+
*
114+
* This one works the same as option "socket_write_timeout", but has lower priority.
115+
*
116+
* @see \Swoole\Constant::OPTION_SOCKET_WRITE_TIMEOUT
117+
*/
98118
public const OPTION_SOCKET_SEND_TIMEOUT = 'socket_send_timeout';
99119

120+
/**
121+
* Default socket read timeout in seconds.
122+
*
123+
* This one works the same as option "socket_recv_timeout", but has higher priority.
124+
*
125+
* @see \Swoole\Constant::OPTION_SOCKET_RECV_TIMEOUT
126+
*/
100127
public const OPTION_SOCKET_READ_TIMEOUT = 'socket_read_timeout';
101128

129+
/**
130+
* Default socket read timeout in seconds.
131+
*
132+
* This one works the same as option "socket_read_timeout", but has lower priority.
133+
*
134+
* @see \Swoole\Constant::OPTION_SOCKET_READ_TIMEOUT
135+
*/
102136
public const OPTION_SOCKET_RECV_TIMEOUT = 'socket_recv_timeout';
103137

104-
public const OPTION_SOCKET_BUFFER_SIZE = 'socket_buffer_size';
105-
138+
/**
139+
* Default socket read/write timeout in seconds.
140+
*
141+
* This one has the highest priority than the other read/write timeout options:
142+
* - \Swoole\Constant::OPTION_SOCKET_WRITE_TIMEOUT
143+
* - \Swoole\Constant::OPTION_SOCKET_SEND_TIMEOUT
144+
* - \Swoole\Constant::OPTION_SOCKET_READ_TIMEOUT
145+
* - \Swoole\Constant::OPTION_SOCKET_RECV_TIMEOUT
146+
*
147+
* @see \Swoole\Constant::OPTION_SOCKET_SEND_TIMEOUT
148+
* @see \Swoole\Constant::OPTION_SOCKET_WRITE_TIMEOUT
149+
* @see \Swoole\Constant::OPTION_SOCKET_RECV_TIMEOUT
150+
* @see \Swoole\Constant::OPTION_SOCKET_READ_TIMEOUT
151+
*/
106152
public const OPTION_SOCKET_TIMEOUT = 'socket_timeout';
107153

154+
public const OPTION_SOCKET_BUFFER_SIZE = 'socket_buffer_size';
155+
108156
public const OPTION_HTTP2_HEADER_TABLE_SIZE = 'http2_header_table_size';
109157

110158
public const OPTION_HTTP2_ENABLE_PUSH = 'http2_enable_push';

0 commit comments

Comments
 (0)