Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Freenet
Class tcpConnection  view tcpConnection download tcpConnection.java

java.lang.Object
  extended byFreenet.Connection
      extended byFreenet.tcpConnection

public class tcpConnection
extends Connection


Nested Class Summary
private  class tcpConnection.ConnectThread
           
 
Field Summary
protected  java.net.Socket sock
           
 
Fields inherited from class Freenet.Connection
in, out
 
Constructor Summary
tcpConnection(java.net.Socket sock)
           
tcpConnection(tcpAddress addr)
           
 
Method Summary
 void close()
           
 Address getMyAddress()
           
 Address getMyAddress(ListeningAddress lstaddr)
           
 Address getPeerAddress()
           
 Address getPeerAddress(ListeningAddress lstaddr)
           
 void setSoTimeout(int timeout)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sock

protected java.net.Socket sock
Constructor Detail

tcpConnection

public tcpConnection(tcpAddress addr)
              throws java.net.UnknownHostException,
                     java.io.IOException,
                     ConnectTimedOutException

tcpConnection

public tcpConnection(java.net.Socket sock)
              throws java.io.IOException
Method Detail

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


close

public void close()
Specified by:
close in class Connection

setSoTimeout

public void setSoTimeout(int timeout)
                  throws java.io.IOException
Specified by:
setSoTimeout in class Connection

getMyAddress

public Address getMyAddress(ListeningAddress lstaddr)
Specified by:
getMyAddress in class Connection

getMyAddress

public Address getMyAddress()
Specified by:
getMyAddress in class Connection

getPeerAddress

public Address getPeerAddress(ListeningAddress lstaddr)
Specified by:
getPeerAddress in class Connection

getPeerAddress

public Address getPeerAddress()
Specified by:
getPeerAddress in class Connection