tanszek:oktatas:informacios_rendszerek_integralasa:java_socket
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
tanszek:oktatas:informacios_rendszerek_integralasa:java_socket [2024/03/06 08:30] – [2.) Hagyományos UDP alapú kommunikáció] knehez | tanszek:oktatas:informacios_rendszerek_integralasa:java_socket [2024/03/06 08:34] (current) – knehez | ||
---|---|---|---|
Line 202: | Line 202: | ||
==== 2.) Hagyományos UDP alapú kommunikáció ==== | ==== 2.) Hagyományos UDP alapú kommunikáció ==== | ||
- | 2.a) Az alábbi Ágens küld egy üzenetet és a 8080-as porton várja a választ rá, ugyancsak UDP-vel. | + | a) Az alábbi Ágens küld egy üzenetet és a 8080-as porton várja a választ rá, ugyancsak UDP-vel. |
**Feladat**: | **Feladat**: | ||
Line 215: | Line 215: | ||
import java.net.InetAddress; | import java.net.InetAddress; | ||
| | ||
- | public class UDPClient | + | public class Component1 |
public static void main(String args[]) throws Exception { | public static void main(String args[]) throws Exception { | ||
BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in)); | BufferedReader inFromUser = new BufferedReader(new InputStreamReader(System.in)); | ||
Line 240: | Line 240: | ||
</ | </ | ||
- | 2.b) Az UDP szerver | + | b) A másik |
<sxh java> | <sxh java> | ||
Line 249: | Line 249: | ||
import java.net.InetAddress; | import java.net.InetAddress; | ||
| | ||
- | public class UDPServer | + | public class Component2 |
public static void main(String args[]) throws Exception { | public static void main(String args[]) throws Exception { | ||
tanszek/oktatas/informacios_rendszerek_integralasa/java_socket.1709713808.txt.gz · Last modified: 2024/03/06 08:30 by knehez