@@ -30,7 +30,7 @@ built-in fsockopen() function, and does not require any special extensions or co
30
30
The Socket adapter allows several extra configuration options that can be set using
31
31
` Zend\Http\Client->setOptions() ` or passed to the client constructor.
32
32
33
- > ## Note
33
+ > ### Note
34
34
#### Persistent TCP Connections
35
35
Using persistent * TCP* connections can potentially speed up * HTTP* requests - but in most use cases,
36
36
will have little positive effect and might overload the * HTTP* server you are connecting to.
@@ -41,7 +41,8 @@ both the client speed and server load before using this option.
41
41
Additionally, when using persistent connections it is recommended to enable Keep-Alive * HTTP*
42
42
requests as described in \[ the configuration section\] (zend.http.client.options)- otherwise
43
43
persistent connections might have little or no effect.
44
- #### note
44
+
45
+ > ### Note
45
46
#### HTTPS SSL Stream Parameters
46
47
` ssltransport ` , ` sslcert ` and ` sslpassphrase ` are only relevant when connecting using * HTTPS* .
47
48
While the default * SSL* settings should work for most applications, you might need to change them if
@@ -132,7 +133,7 @@ $opts = stream_context_get_options($adapter->getStreamContext());
132
133
echo $opts['ssl']['peer_certificate'];
133
134
```
134
135
135
- > ## Note
136
+ > ### Note
136
137
Note that you must set any stream context options before using the adapter to perform actual
137
138
requests. If no context is set before performing * HTTP* requests with the Socket adapter, a default
138
139
stream context will be created. This context resource could be accessed after performing any
@@ -182,7 +183,7 @@ As mentioned, if `proxy_host` is not set or is set to a blank string, the connec
182
183
to a regular direct connection. This allows you to easily write your application in a way that
183
184
allows a proxy to be used optionally, according to a configuration parameter.
184
185
185
- > ## Note
186
+ > ### Note
186
187
Since the proxy adapter inherits from ` Zend\Http\Client\Adapter\Socket ` , you can use the stream
187
188
context access method (see \[ this section\] (zend.http.client.adapters.socket.streamcontext)) to set
188
189
stream context options on Proxy connections as demonstrated above.
0 commit comments