如何通过封闭网络搜索特定计算机?

发布于 2024-08-22 15:05:38 字数 321 浏览 6 评论 0原文

我有一个由 16 台计算机组成的网络,全部连接到同一交换机,但未连接到互联网。 16 台计算机中的一台运行着一个小型 Java 应用程序以及 BlazeDS 服务器(也称为侦听端口上的消息)。

目前,其他 15 台“客户端”计算机必须手动输入 java 应用程序所在的“服务器”IP。我的客户端应用程序是 Adob​​e Air,因此我没有扫描服务器的能力。

我正在考虑用 Java 或 C++ 编写一个帮助应用程序/实用程序。至少,这个应用程序可以向用户显示 IP,然后用户可以将其输入到 Air 应用程序中;草率但总比没有好。

我确信有一些工具可以解决此类问题。有什么想法吗?

I have a network of 16 computers all linked to the same switch, not connected to the internet. One of the 16 computers has a small Java app running on it along with a BlazeDS server (aka it's listening on a port for a message).

Currently, the other 15 "client" computers have to manually enter the "server" IP where the java app resides. My client app is Adobe Air, so I have no abilities there as far as scanning for the server.

I was thinking of writing a helper app / utility in Java or C++. At the very least, this app could display the IP to the user who could then input it into the Air app; sloppy but better than nothing.

I'm sure there are some tools out there that deal with this type of problem. Any ideas?

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

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

发布评论

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

评论(5

茶花眉 2024-08-29 15:05:38

我强烈建议为此使用 Zeroconf/Bonjour,因为它可以轻松处理去中心化的“我应该了解的其他人和我应该了解的其他人在哪里”?

在 Java 中(并且完全在您自己的应用程序中)执行此操作的最简单方法是使用 jmdns 项目。 http://jmdns.sourceforge.net/

I would strongly recommend using Zeroconf/Bonjour for this as it makes it trivially easy to handle decentralized "where is the others who I should know about and should know about me"?

The easiest way to do this in Java (and completely inside your own application) is with the jmdns project. http://jmdns.sourceforge.net/

浅忆 2024-08-29 15:05:38

您可以为用户编写一个“发现”功能,该功能向当前计算机的同一子网中的所有 IP 地址发送心跳或测试消息,以查找适当接受/响应的服务器。

You could code a "discover" feature for the users that sends a heartbeat or test message to all the IP addresses in the same subnet of the current computer looking for the server that accepts / responds appropriately.

梦年海沫深 2024-08-29 15:05:38

简而言之,nmap。您可以告诉它扫描网络块

$ nmap -P0 10.104.244.200

Starting Nmap 4.20 ( http://insecure.org ) at 2010-02-19 18:02 Eastern Standard Time
Interesting ports on BOSA638992.fmrco.com (10.104.244.200):
Not shown: 1688 closed ports
PORT     STATE SERVICE
25/tcp   open  smtp
80/tcp   open  http
135/tcp  open  msrpc
139/tcp  open  netbios-ssn
371/tcp  open  clearcase
443/tcp  open  https
445/tcp  open  microsoft-ds
2030/tcp open  device2
3389/tcp open  ms-term-serv
MAC Address: 00:17:A4:F3:6D:A7 (Global Data Services)

Nmap finished: 1 IP address (1 host up) scanned in 1.750 seconds

请参阅http://nmap.org/

In a word, nmap. You can tell it to scan a netblock

$ nmap -P0 10.104.244.200

Starting Nmap 4.20 ( http://insecure.org ) at 2010-02-19 18:02 Eastern Standard Time
Interesting ports on BOSA638992.fmrco.com (10.104.244.200):
Not shown: 1688 closed ports
PORT     STATE SERVICE
25/tcp   open  smtp
80/tcp   open  http
135/tcp  open  msrpc
139/tcp  open  netbios-ssn
371/tcp  open  clearcase
443/tcp  open  https
445/tcp  open  microsoft-ds
2030/tcp open  device2
3389/tcp open  ms-term-serv
MAC Address: 00:17:A4:F3:6D:A7 (Global Data Services)

Nmap finished: 1 IP address (1 host up) scanned in 1.750 seconds

See http://nmap.org/

粉红×色少女 2024-08-29 15:05:38

Adobe AIR 2.0(以测试版形式提供)能够与本机进程进行通信。请参阅 http://www.adobe.com/devnet/air/flex /quickstart/interacting_with_native_process.html

您可以使用此工具来调用您编写并随应用程序一起提供的帮助程序。该助手将使用一些方法来发现您的服务器。例如zeroConf Networking(Apple 称为Bonjour)。然后,您的 AIR 应用程序将使用从帮助程序收到的地址来建立与服务器的连接。

Adobe AIR 2.0 (available as Beta) has the ability to communicate with native processes. See http://www.adobe.com/devnet/air/flex/quickstart/interacting_with_native_process.html

You can use this facility to call a helper that you write and ship with your app. This helper would use some means of discovering your server. For instance zeroConf Networking (called Bonjour by Apple). Your AIR app would than use the address it received from the helper to make a connection to the server.

岛歌少女 2024-08-29 15:05:38

多播可以工作 - 如果您对 java 感到满意,http://www.jgroups.org 怎么样

multicast would work - how about http://www.jgroups.org if you are happy with java

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