All Packages  This Package  Class Hierarchy  Class Search  Index

Class kh.net.AcceptingSocket
java.lang.Object
   |
   +----kh.net.AcceptingSocket

  Summary

public class  AcceptingSocket
     extends java.lang.Object
{
          // Constructors 1
     public AcceptingSocket() throws IOException;

          // Methods 5
     public void close() throws IOException;
     public SocketIdentifier getIdentifier();
     public InputStream getInputStream() throws IOException;
     public OutputStream getOutputStream() throws IOException;
     public Socket getSocket() throws IOException;
}

This class creates a server socket then waits for a single connection. Used with SocketIdentifier to create a port we expect someone to call us back on.




  Constructors

· AcceptingSocket

Summary  |  Top

   public AcceptingSocket()  throws IOException


  Methods

· close

Summary  |  Top
   public void close()  throws IOException


· getIdentifier

Summary  |  Top
   public SocketIdentifier getIdentifier() 

Return an ID which can be used to connect to this socket



· getInputStream

Summary  |  Top
   public InputStream getInputStream()  throws IOException

This utility routine makes it easy to connect streams between two different machines. Just create an AcceptingSocket on machine A. Send the ID to machine B and create a ConnectingSocket on machine B.



· getOutputStream

Summary  |  Top
   public OutputStream getOutputStream()  throws IOException

This utility routine makes it easy to connect streams between two different machines. Just create an AcceptingSocket on machine A. Send the ID to machine B and create a ConnectingSocket on machine B.



· getSocket

Summary  |  Top
   public Socket getSocket()  throws IOException

If we have accepted - then return the socket we are talking with. If we haven't accepted wait for the accept.



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7