Google App Engine TCP/IP连接

huangapple go评论102阅读模式
英文:

Google App Engine TCP/IP connection

问题

我想在GAE中使用Go建立一对TCP/IP连接。根据我的搜索结果,从应用引擎获取静态IP是不可能的,但是我找不到关于其他限制的太多数据。

在GAE中是否可以建立TCP/IP连接,如果可以,它可以在重新建立之前使用多长时间?

英文:

I would like to set up a couple TCP/IP connections in GAE using Go. As I've searched it is impossible to get a static IP from the app engine, but can't find much data on other limitations.

Is it possible to establish a TCP/IP connection in GAE, and if so, how long can it be used before it has to be re-established?

答案1

得分: 8

这里1明确提到在他们的沙盒环境中,你不能打开一个套接字。
现在HTTP也是基于TCP/IP的,你可以使用URL(在Python中是urllib和urllib2,不太了解Go)来“获取”内容。但是原始的SOCK_STREAM连接?不行。

问候,

Yati Sagade

英文:

It is clearly mentioned here that you may not open a socket from within their sandboxed environment.
Now HTTP is also based on TCP/IP, and you may "fetch" content using URLs (in Python it's urllib and urllib2, don't know much about Go). But raw SOCK_STREAM connections? NO.

regards,

Yati Sagade

答案2

得分: 5

从2013年7月开始,情况发生了变化,现在Java和Python都有一个实验性的Socket服务可用。它仅适用于付费账户,您只能创建出站连接,并且有一些其他限制。此外,文档中提到,该API不稳定,可能会发生变化。

从2013年12月开始,Go语言也有一个实验性的Socket服务可用。相关文档页面中的条件与Java和Python的条件类似。

英文:

The situation has changed and as of July 2013 there is an experimental Socket service available for Java and Python. It is enabled only for paid accounts, you can only create outbound connections, and there are few other limitations. Also, the docs says that the API is not stable and may be subject to changes.

As of December 2013 there is the experimental Socket service available for Go as well. The conditions in the relevant doc page are similar to the ones for Java and Python.

huangapple
  • 本文由 发表于 2011年10月8日 07:00:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/7693629.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定