错误连接FCM xmpp连接矩阵xmpp [英] Error connection FCM xmpp connection by matrix xmpp

查看:130
本文介绍了错误连接FCM xmpp连接矩阵xmpp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试通过矩阵客户端连接FCM xmpp服务器,但连接未经过身份验证和打开。



收到错误消息因为目标机器没有建立连接因为目标机器主动拒绝了它74.125.24.188:5235



我尝试过:



I am trying to connect FCM xmpp server by matrix client but the connection is not authenticated and opened.

getting the error message as No connection could be made because the target machine actively refused it 74.125.24.188:5235

What I have tried:

xmppClient.XmppDomain = "gcm.googleapis.com";
xmppClient.Hostname = "fcm-xmpp.googleapis.com";
xmppClient.Port = 5235;

xmppClient.ResolveSrvRecords = false;
xmppClient.OldStyleSsl = true;

xmppClient.Username = senderId;     // your sender id
xmppClient.Password = serverKey;    // your server key

xmppClient.AutoRoster = false;
xmppClient.AutoPresence = false;
xmppClient.Open();

var jsonMessgae = new JObject(new
{
	notification = new
	{
		title = "Portugal vs. Denmark",
		body = "5 to 1"
	},
	message_id = Guid.NewGuid().ToString(),
	to = testDeviceId
});

var msg = new Message { Id = Guid.NewGuid().ToString() };
msg.Add(new Gcm { Value = jsonMessgae.ToString() });

xmppClient.Send(msg);

推荐答案

它不喜欢你的连接协议。它不承认它。它不知道谁在敲门。它期待一个特定的命令序列。
It doesn't like your "connection protocol". It doesn't recognize it. It doesn't know who's knocking. It's expecting a particular command sequence.


这篇关于错误连接FCM xmpp连接矩阵xmpp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆