本文介绍了使所有网络上GCM工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个跟进这个问题。

This is a follow up to this question.

Which端口和协议做谷歌云消息(GCM)使用?

这里的问题是,有很多的WiFi网络在那里可阻断端口GCM使用,对我来说是听起来很疯狂,一个推解决方案使用常常阻塞端口,它使我们的解决方案不可靠的。我们建立消费市场的应用程序,而不是企业,所以我们可以像只是将端口范围5228-5230工作,确保这些端口在网络中开设了保留意见。

The issue here is that there are many WIFI networks out there which blocks the ports GCM use, and for me is sounds crazy that a push solution uses so often blocked ports, it makes our solution unreliable. We build apps for consumer market, not enterprises, so we can make reservations like "will only work on port range 5228-5230, make sure these ports are opened in your network".

我不能成为第一个遇到此问题,是落后于谷歌的使用这些端口的理性的,我怎么能解决它的最佳实践方法是什么?

I can't be the first one encountering this problem, was is the rational behind Google's use of these ports, and how can I work around it in a best practice way?

推荐答案

据我了解,当您在网络中设置了防火墙,它阻止除默认的端口,所有端口(用于一般用途,如HTTP,HTTPS,SMTP等)。如果使用其他端口,您必须手动打开它们。

As I understand it, when you set a firewall in your network, it blocks all ports except default ports (used for general purposes such as HTTP, HTTPS, SMTP, etc...). If you to use other ports, you have to open them manually.

谷歌需要一些端口,为他们服务,他们选择了5228-5230。以类似的方式,苹果选择5223为他们的推送通知。两者都将被封锁在一个正常的防火墙的配置,并且已被手动打开。

Google needed some ports for their service, and they chose 5228-5230. In a similar way, Apple chose 5223 for their push notifications. Both will be blocked in a normal firewall configuration, and have to be manually opened.

由于这个问题是不是唯一的应用程序(即使用谷歌云消息将受港口被封锁的GCM以同样的方式,即所有的应用程序),没有一点担心。

Since this issue is not unique to your applications (i.e. all the applications that use Google Cloud Messaging will be affected the same way by the GCM ports being blocked), there is no point worrying about it.

这篇关于使所有网络上GCM工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-15 17:45