У меня есть простой PHP-код, который создает соединение SSL
$streamContext = stream_context_create();
stream_context_set_option($streamContext, 'ssl', 'local_cert', $this->sslPem);
stream_context_set_option($streamContext, 'ssl', 'passphrase', $this->passPhrase);
$this->apnsConnection = stream_socket_client('ssl://'.$this->apnsHost.':'.$this->apnsPort, $error, $errorString, 60, STREAM_CLIENT_CONNECT, $streamContext);
Но знаете, как установить для SO_KEEPALIVE значение true? Я также пробовал STREAM_CLIENT_PERSISTENT, что не одно и то же.