cgl.narada.transport.ptcp.psocket
Class PTCPServerSocket

java.lang.Object
  extended by cgl.narada.transport.ptcp.psocket.PTCPServerSocket
All Implemented Interfaces:
PTCPParameters

public class PTCPServerSocket
extends Object
implements PTCPParameters

Title:

Description:

Copyright: Copyright (c) 2004

Company:

Version:
1.0

Field Summary
 
Fields inherited from interface cgl.narada.transport.ptcp.psocket.tools.PTCPParameters
COMM_SOCKET, DATA_SOCKET, PTCPBuffer_Debug, PTCPDataFragmentator_Debug, PTCPInputStream_Debug, PTCPOutputStream_Debug, PTCPPacket_Debug, PTCPReceiverWorker_Debug, PTCPSenderWorker_Debug, PTCPServerSocket_Debug, PTCPSocket_Debug, PTCPSocketInfo_Debug
 
Constructor Summary
PTCPServerSocket()
           
PTCPServerSocket(int port)
          Constructor.
PTCPServerSocket(int port, int backlog)
          Constructor.
PTCPServerSocket(int port, int backlog, InetAddress bindAddr)
          Constructor.
 
Method Summary
 PTCPSocket accept()
          This returns a PSocket that connected to client.
 void close()
           
 String[] readCommSocketData(Socket socket)
           
 int[] readOptTCPWindowSize(Socket socket)
           
 String[] readSocketData(Socket socket)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PTCPServerSocket

public PTCPServerSocket()

PTCPServerSocket

public PTCPServerSocket(int port)
Constructor. Creates a server socket on a specified port. A port of 0 creates a socket on any free port. The maximum queue length for incoming connection indications (a request to connect) is set to 50. If a connection indication arrives when the queue is full, the connection is refused.


PTCPServerSocket

public PTCPServerSocket(int port,
                        int backlog)
Constructor. Creates a server socket and binds it to the specified local port number, with the specified backlog. A port number of 0 creates a socket on any free port. The maximum queue length for incoming connection indications (a request to connect) is set to the backlog parameter. If a connection indication arrives when the queue is full, the connection is refused.


PTCPServerSocket

public PTCPServerSocket(int port,
                        int backlog,
                        InetAddress bindAddr)
Constructor. Create a server with the specified port, listen backlog, and local IP address to bind to. The bindAddr argument can be used on a multi-homed host for a ServerSocket that will only accept connect requests to one of its addresses. If bindAddr is null, it will default accepting connections on any/all local addresses. The port must be between 0 and 65535, inclusive.

Method Detail

accept

public PTCPSocket accept()
This returns a PSocket that connected to client.


readCommSocketData

public String[] readCommSocketData(Socket socket)

readOptTCPWindowSize

public int[] readOptTCPWindowSize(Socket socket)

readSocketData

public String[] readSocketData(Socket socket)

close

public void close()
           throws IOException
Throws:
IOException


For comments and suggestions please send e-mail to The NaradaBrokering Project