-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDatagramSocket.java
More file actions
54 lines (43 loc) · 1.24 KB
/
DatagramSocket.java
File metadata and controls
54 lines (43 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
package JAVARuntime;
import java.io.IOException;
import java.net.DatagramSocketImpl;
import java.net.InetAddress;
import java.net.Proxy;
import java.net.SocketAddress;
import java.net.SocketException;
import java.net.SocketImpl;
public class DatagramSocket extends java.net.DatagramSocket {
public DatagramSocket() throws SocketException {
validateThread();
}
public DatagramSocket(DatagramSocketImpl impl) {
super(impl);
}
public DatagramSocket(SocketAddress bindaddr) throws SocketException {
super(bindaddr);
}
public DatagramSocket(int port) throws SocketException {
super(port);
}
public DatagramSocket(int port, InetAddress laddr) throws SocketException {
super(port, laddr);
}
@Override
public synchronized void bind(SocketAddress addr) throws SocketException {
validateThread();
super.bind(addr);
}
@Override
public void connect(InetAddress address, int port) {
validateThread();
super.connect(address, port);
}
@Override
public void connect(SocketAddress addr) throws SocketException {
validateThread();
super.connect(addr);
}
private static void validateThread() {
//
}
}