Home

About

Advanced Search

Browse by Discipline

Scientific Societies

E-print Alerts

Add E-prints

E-print Network
FAQHELPSITE MAPCONTACT US


  Advanced Search  

 
15 Das Package java.net 15.11 Datagramme 15-29 JavaNet/Datagramme/Bestellung.java
 

Summary: 15 Das Package java.net 15.11 Datagramme 15-29
JavaNet/Datagramme/Bestellung.java
14 String meinHost;
15 int meinPort;
18 public void init()
19 {
26 meinHost = getCodeBase().getHost();
27 meinPort = Integer.parseInt(getParameter("meinPort"));
36 }
42 private void sendeNachricht(String nachricht)
43 {
67 byte[] data = new byte[nachricht.length()];
68 data = nachricht.getBytes();
69 InetAddress addr = InetAddress.getByName(meinHost);
70 DatagramPacket pack = new DatagramPacket(data, data.length, addr,
71 meinPort);
72 DatagramSocket ds = new DatagramSocket();
73 ds.send(pack);
74 ds.close();
Quelltextanalyse

  

Source: Arndt, Holger - Fachgruppe Mathematik, Fachbereich Mathematik-Naturwissenschaften, Bergische Universitšt Wuppertal

 

Collections: Computer Technologies and Information Sciences