com.planet_ink.coffee_mud.core
Class CoffeeIOPipe.CoffeePipeSocket

java.lang.Object
  extended by java.net.Socket
      extended by com.planet_ink.coffee_mud.core.CoffeeIOPipe.CoffeePipeSocket
Enclosing class:
CoffeeIOPipe

public static class CoffeeIOPipe.CoffeePipeSocket
extends java.net.Socket

A fake socket that consists of a pair of CoffeePipes.


Constructor Summary
CoffeeIOPipe.CoffeePipeSocket(java.net.InetAddress addr, CoffeeIOPipe myPipe, CoffeeIOPipe friendPipe)
          Constructs a fake pipey socket.
 
Method Summary
 void close()
           
 java.net.InetAddress getInetAddress()
           
 CoffeeIOPipe.CMInputStream getInputStream()
           
 CoffeeIOPipe.CMOutputStream getOutputStream()
           
 boolean isClosed()
           
 boolean isConnected()
           
 void shutdownInput()
           
 void shutdownOutput()
           
 
Methods inherited from class java.net.Socket
bind, connect, connect, getChannel, getKeepAlive, getLocalAddress, getLocalPort, getLocalSocketAddress, getOOBInline, getPort, getReceiveBufferSize, getRemoteSocketAddress, getReuseAddress, getSendBufferSize, getSoLinger, getSoTimeout, getTcpNoDelay, getTrafficClass, isBound, isInputShutdown, isOutputShutdown, sendUrgentData, setKeepAlive, setOOBInline, setPerformancePreferences, setReceiveBufferSize, setReuseAddress, setSendBufferSize, setSocketImplFactory, setSoLinger, setSoTimeout, setTcpNoDelay, setTrafficClass, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CoffeeIOPipe.CoffeePipeSocket

public CoffeeIOPipe.CoffeePipeSocket(java.net.InetAddress addr,
                                     CoffeeIOPipe myPipe,
                                     CoffeeIOPipe friendPipe)
                              throws java.io.IOException
Constructs a fake pipey socket.

Parameters:
addr - the fake address to use when asked.
myPipe - the pipe to one side of the socket
friendPipe - the pipe to the other side of the socket
Throws:
java.io.IOException
Method Detail

shutdownInput

public void shutdownInput()
                   throws java.io.IOException
Overrides:
shutdownInput in class java.net.Socket
Throws:
java.io.IOException

shutdownOutput

public void shutdownOutput()
                    throws java.io.IOException
Overrides:
shutdownOutput in class java.net.Socket
Throws:
java.io.IOException

isConnected

public boolean isConnected()
Overrides:
isConnected in class java.net.Socket

isClosed

public boolean isClosed()
Overrides:
isClosed in class java.net.Socket

close

public void close()
           throws java.io.IOException
Overrides:
close in class java.net.Socket
Throws:
java.io.IOException

getInputStream

public CoffeeIOPipe.CMInputStream getInputStream()
                                          throws java.io.IOException
Overrides:
getInputStream in class java.net.Socket
Throws:
java.io.IOException

getOutputStream

public CoffeeIOPipe.CMOutputStream getOutputStream()
                                            throws java.io.IOException
Overrides:
getOutputStream in class java.net.Socket
Throws:
java.io.IOException

getInetAddress

public java.net.InetAddress getInetAddress()
Overrides:
getInetAddress in class java.net.Socket