Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
withTlsContext example
$result
->
onResolve
(
function
D
$e
,
$socket
)
{
$this
->handle =
$socket
?->
getResource
(
)
;
}
)
;
return
$result
;
}
}
;
$connector
->connector =
new
DnsConnector
(
new
AmpResolver
(
$this
->dnsCache
)
)
;
$context
=
(
new
ConnectContext
(
)
)
->
withTcpNoDelay
(
)
->
withTlsContext
(
$context
)
;
if
(
$options
[
'bindto'
]
)
{
if
(
file_exists
(
$options
[
'bindto'
]
)
)
{
$connector
->uri = 'unix://'.
$options
[
'bindto'
]
;
}
else
{
$context
=
$context
->
withBindTo
(
$options
[
'bindto'
]
)
;
}
}
if
(
$options
[
'proxy'
]
)
{
$proxyUrl
=
parse_url
(
$options
[
'proxy'
]
[
'url'
]
)
;