云上简单的基于套接字的服务器

发布于 2024-10-04 12:11:32 字数 233 浏览 4 评论 0原文

我正在编写一个应用程序来侦听特定端口上的传入连接。客户端是安装在汽车上的 GPS 跟踪设备,服务器目前使用异步套接字在 .NET 中实现。一切工作正常,但我正在考虑将服务器迁移到 Azure 等云服务,以减轻自己照顾随时可能出现故障的硬件的苦差事。

我的问题是:云服务器能否为我提供一个固定的 IP 地址,让我的代码在特定端口上侦听?服务器做的处理很少(一些 NMEA 句子解析),所以我认为在云上托管的成本不会很高。任何提示表示赞赏。

I am writing an application that listens for incoming connections on specific ports. The clients are GPS tracking devices installed on cars and the server is currently implemented in .NET using asynchronous sockets. Everything works fine, but I am thinking of moving the server to a cloud service such as Azure in order to relieve myself of the chore of taking care of the hardware which may fail at any time.

My question is: can the cloud server offer me a fixed IP address on which my code would listen on a specific port? The server does little processing (some NMEA sentence parsing) so I think the cost of hosting on the cloud would not be high. Any hints are appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别忘他 2024-10-11 12:11:33

在 Windows Azure 中,您将获得一个固定的 DNS 名称,该名称将解析为当前分配的 IP 地址(如果运行多个辅助角色,请记住负载平衡)。

Rackspace 云 中,您会获得固定的 IP 地址。在 Amazon EC2 中,您有类似 弹性 IP 的内容

In windows Azure you get a fixed DNS name, which would resolve to the currently assigned IP address (keep in mind Load balancing, if running more than worker role).

In Rackspace cloud you get a fixed IP address. In Amazon EC2 you have something like Elastic IP

胡大本事 2024-10-11 12:11:33

您可以固定外部端口号,但如果您创建更多角色实例,IP 地址会有所不同。

You can fix the external port number, but the ip address would vary if you create more instances of the role.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文