Skip to content

Commit db76959

Browse files
authored
Update UDP_S.java
1 parent 42571e5 commit db76959

File tree

1 file changed

+20
-26
lines changed

1 file changed

+20
-26
lines changed

UDP_S.java

Lines changed: 20 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
11

2-
32
import jp.jbxl.*;
43

5-
6-
74
class UDP_S
85
{
9-
10-
public static void main(String args[])
11-
{
12-
UDP udp = new UDP(8000);
13-
String recv = "";
14-
15-
while(true){
16-
try {
17-
recv = udp.recvMesg();
18-
udp.sendMesgln("OK");
19-
}
20-
catch (Exception er) {
21-
//er.printStackTrace();
22-
recv = "接続失敗\n";
23-
System.out.print(recv);
24-
break;
25-
}
26-
27-
System.out.print(recv);
28-
}
29-
udp.close();
30-
}
31-
6+
public static void main(String args[])
7+
{
8+
UDP udp = new UDP(8000);
9+
String recv = "";
10+
11+
while(true){
12+
try {
13+
recv = udp.recvMesg();
14+
udp.sendMesgln("OK");
15+
}
16+
catch (Exception er) {
17+
//er.printStackTrace();
18+
recv = "接続失敗\n";
19+
System.out.print(recv);
20+
break;
21+
}
22+
System.out.print(recv);
23+
}
24+
udp.close();
25+
}
3226
}

0 commit comments

Comments
 (0)