個人的に私はこれを使用します:
sslStream.AuthenticateAsClient( "gateway.sandbox.push.apple.com"、clientCertificateCollection、SslProtocols.Default、false);
using (TcpClient client = new TcpClient())
{
client.Connect("gateway.sandbox.push.apple.com", 2195);
using (NetworkStream networkStream = client.GetStream())
{
try
{
SslStream sslStream = new SslStream(client.GetStream(), false);
try
{
sslStream.AuthenticateAsClient("gateway.sandbox.push.apple.com", "gateway.sandbox.push.apple.com", SslProtocols.Default, false);
//building messages
sslStream.Write(msg);
sslStream.close();