Google Cloud Messaging (GCM) 使用哪个端口和协议(protocol)?
我们有时会遇到消息无法通过的情况,并且注意到这取决于我们所在的网络。
最佳答案
设备通过端口 5228-5230 访问 GCM 服务器。
Note: If your organization has a firewall that restricts the traffic to or from the Internet, you'll need to configure it to allow connectivity with GCM. The ports to open are: 5228, 5229, and 5230. GCM typically only uses 5228, but it sometimes uses 5229 and 5230. GCM doesn't provide specific IPs. It changes IPs frequently. We recommend against using ACLs but if you must use them, take a broad approach such as the method suggested in this support link.
如果您的设备通过 WiFi 连接到互联网,则相关。
以下是相关 GCM 文档的链接:https://developers.google.com/cloud-messaging/http
关于android - Google Cloud Messaging (GCM) 使用哪个端口和协议(protocol)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15571576/