Here is my usecase, I want to convert this PHP code:
$ctx = stream_context_create(array(
'ssl' => array(
'local_cert' => $myLocalCert,
'passphrase' => $myPassphrase,
),
));
$stream = stream_socket_client(
'tls://gateway.sandbox.push.apple.com:2195',
$errno,
$errstr,
30,
STREAM_CLIENT_CONNECT | STREAM_CLIENT_PERSISTENT,
$ctx
);
fwrite($stream, $myMessage, strlen($myMessage));
to something similar using the great Guzzle lib.
I know that Guzzle has a Stream class, that we can send as "body" of a request, but I don't even know if Guzzle allows to use another protocol than "http(s)"...
Any Guzzle experts here? :)
Supporting custom protocols seems out of scope for an HTTP client like Guzzle.
Are you sending HTTP messages to that endpoint? If so, why can't you use https? If not, what features of Guzzle do you want to use? Most of the library is very HTTP-specific.