public class TrackerServer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected InetSocketAddress |
inetSockAddr |
protected Socket |
sock |
| Constructor and Description |
|---|
TrackerServer(Socket sock,
InetSocketAddress inetSockAddr)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
finalize() |
InetSocketAddress |
getInetSocketAddress()
get the server info
|
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
Socket |
getSocket()
get the connected socket
|
protected Socket sock
protected InetSocketAddress inetSockAddr
public TrackerServer(Socket sock, InetSocketAddress inetSockAddr)
sock - Socket of serverinetSockAddr - the server infopublic Socket getSocket() throws IOException
IOExceptionpublic InetSocketAddress getInetSocketAddress()
public OutputStream getOutputStream() throws IOException
IOExceptionpublic InputStream getInputStream() throws IOException
IOExceptionpublic void close()
throws IOException
IOExceptionCopyright © 2018 lodsve. All rights reserved.