?? senderstarter.java
字號:
/*
* Created on 20 nov. 2005
*
*/
package myDatagramSocketApplication;
/**
* Exemplu de utilizare a clasei DatagramSender.
*
* @author Calin-Gligor Loghin
*/
public class SenderStarter {
public static void main(String[] args) {
//instantiaza datagram senderul
DatagramSender sender = new DatagramSender();
//seteaza hostul destinatie
sender.setHostDestinatie("localhost");
//initializeaza socketul
sender.initSocket();
//trimite mesaj
String mesaj = "Salut clientule ! Uite un mesaj, sper ca il primesti pentru ca nu astept confirmare !";
System.out.println("Mesaj trimis : " + mesaj);
sender.trimiteMesaj(mesaj);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -