| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecttcl.lang.channel.Channel
tcl.lang.channel.AbstractSocketChannel
tcl.lang.channel.ServerSocketChannel
public class ServerSocketChannel
The ServerSocketChannel class implements a channel object for ServerSocket connections, created using the socket -server command.
| Field Summary | 
|---|
| Fields inherited from class tcl.lang.channel.Channel | 
|---|
blocking, buffering, bufferSize, encoding, eofInputFilter, eofOutputFilter, eolInputFilter, eolOutputFilter, finalInputStream, finalReader, firstOutputStream, firstWriter, inputBuffer, inputEofChar, inputTranslation, markableInputStream, mode, nonBlockingOutputStream, outputBuffer, outputEofChar, outputTranslation, rawInputStream, rawOutputStream, READ_OWNERSHIP, refCount, unicodeDecoder, unicodeEncoder, WRITE_OWNERSHIP | 
| Constructor Summary | |
|---|---|
ServerSocketChannel(Interp interp,
                    String localAddr,
                    int port,
                    TclObject callback)
Creates a new ServerSocketChannel object with the given options.  | 
|
| Method Summary | |
|---|---|
 TclObject | 
getError(Interp interp)
This option gets the current error status of the given socket.  | 
protected  InputStream | 
getInputStream()
This method should be overridden in the subclass to provide a channel specific InputStream object.  | 
protected  OutputStream | 
getOutputStream()
This method should be overridden in the subclass to provide a channel specific OutputStream object.  | 
 void | 
seek(Interp interp,
     long offset,
     int mode)
Override to provide specific errors for server socket.  | 
| Methods inherited from class tcl.lang.channel.AbstractSocketChannel | 
|---|
getPeerName, getSockName, setOutputTranslation | 
| Methods inherited from class tcl.lang.channel.Channel | 
|---|
checkRead, checkWrite, close, eof, flush, getBlocking, getBuffering, getBufferSize, getChanName, getEncoding, getInputEofChar, getInputTranslation, getOutputEofChar, getOutputTranslation, initInput, initOutput, isBlocked, isClosed, isReadOnly, isReadWrite, isWriteOnly, read, setBlocking, setBuffering, setBufferSize, setEncoding, setInputEofChar, setInputTranslation, setOutputEofChar, setOwnership, setOwnership, tell, waitForOwnership, write, write | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public ServerSocketChannel(Interp interp,
                           String localAddr,
                           int port,
                           TclObject callback)
                    throws TclException
interp - the current interpreterlocalAddr - the IP address to bind to, or an empty stringport - the port to bind to, or 0 for any portcallback - the Tcl script specified by 'server -socket'
TclException| Method Detail | 
|---|
public void seek(Interp interp,
                 long offset,
                 int mode)
          throws IOException,
                 TclException
seek in class Channelinterp - currrent interpreter.offset - The number of bytes to move the file pointer.mode - where to begin incrementing the file pointer; beginning,
            current, end.
IOException
TclException - if channel does not support seek
protected InputStream getInputStream()
                              throws IOException
Channel
getInputStream in class ChannelIOException
protected OutputStream getOutputStream()
                                throws IOException
Channel
getOutputStream in class ChannelIOException
public TclObject getError(Interp interp)
                   throws TclException
AbstractSocketChannel
getError in class AbstractSocketChannelinterp - current interpreter, for errors
TclException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||