65 |
|
System.out.println("192.168.1.1: " + acl.check("192.168.1.1")); |
66 |
|
|
67 |
|
// setup an ACLServerSocket putting our ACL in |
68 |
+ |
// and an ACLDatagramSocket (which we'll test better later) |
69 |
|
ACLServerSocket ss = null; |
70 |
+ |
ACLDatagramSocket ds = null; |
71 |
|
try { |
72 |
|
ss = new ACLServerSocket(acl, 1337); |
73 |
+ |
ds = new ACLDatagramSocket(acl, 1337); |
74 |
|
} |
75 |
|
catch(IOException e) { |
76 |
|
System.out.println("exception: " + e); |
77 |
|
e.printStackTrace(); |
78 |
|
System.exit(1); |
79 |
|
} |
80 |
+ |
|
81 |
+ |
System.out.println(ss); |
82 |
+ |
System.out.println(ds); |
83 |
|
|
84 |
|
// start listening |
85 |
|
// valid connections (allowed by ACL) will get a message sent back |