英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论