在LAN中广播的Java程序 [英] Java program to broadcast in LAN

查看:89
本文介绍了在LAN中广播的Java程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在开发一个在局域网中使用的java应用程序。在我的应用程序中,一个系统将使用一个关键字进行广播,所有其他系统将使用该关键字执行某些操作并使用结果回复发件人

发件人:广播(关键字)

接收系统:result = DoSomething(关键字),RespondToSender(结果)



这里,发送者不是服务器。

接收方可能是也可能不是服务器 - 广播意味着来自发送方的消息将发送到LAN中的所有系统(包括服务器,其他对等系统等)。



此应用程序适用于Windows(目前在Windows 7中)系统



如何进行此广播部分,



非常感谢...

Hi everyone,
I am developing a java application to use in LAN. In my app, one system will broadcast with one keyword, all other system will do something with that keyword and respond to the sender with the result
sender: Broadcast(keyword)
receiver systems: result=DoSomething(keyword), RespondToSender(result)

Here, sender is not a server.
Receiver may or may not be a server- broadcasting means message from sender will go to all systems in LAN( including server, other peer systems etc..)

And this application is meant for windows (currently in windows 7) system

How to do this broadcasting part,

Many thanks in advance...

推荐答案

您可能需要使用Java的网络功能;请参阅 http://docs.oracle.com/javase/tutorial/networking/ [ ^ ]。
You probably need to use the networking features of Java; see http://docs.oracle.com/javase/tutorial/networking/[^].


这篇关于在LAN中广播的Java程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆