| Home >> All |
Source code: Freenet/tcpListeningAddress.java
1 package Freenet; 2 3 import java.net.*; 4 5 /* 6 This code is part of the Java Adaptive Network Client by Ian Clarke. 7 It is distributed under the GNU Public Licence (GPL) version 2. See 8 http://www.gnu.org/ for further details of the GPL. 9 10 Requires Classes: ProtocolAddress 11 12 */ 13 14 public class tcpListeningAddress extends ProtocolListeningAddress 15 { 16 /** The port number that the client is listening to **/ 17 public int port; 18 19 public tcpListeningAddress(int portnum) 20 { 21 port = portnum; 22 } 23 24 public tcpListeningAddress(String str) 25 throws IllegalArgumentException 26 { 27 try { port=new Integer(str).intValue(); } 28 catch(NumberFormatException e) 29 { throw new IllegalArgumentException(); } 30 } 31 }