equip.net
Class ServerSapTcp

java.lang.Object
  extended byequip.net.ServerSap
      extended byequip.net.ServerSapTcp

public class ServerSapTcp
extends ServerSap

Concrete implemented of ServerSap using ServerSocket.


Field Summary
protected  java.net.ServerSocket socket
           
 
Fields inherited from class equip.net.ServerSap
address, port, status
 
Constructor Summary
ServerSapTcp()
          Open on any port
ServerSapTcp(short port)
          Open on specific port
 
Method Summary
 ConnectionSap accept()
          Accept an incoming connection, normally blocking
 void close()
          Close the server socket (no more connections)
protected  void finalize()
           
 int getProtocol()
          What protocol (from SapProtocol)
protected  void init(short port)
           
 
Methods inherited from class equip.net.ServerSap
getAddress, getPort, getStatus, rewriteLocalAddress
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

socket

protected java.net.ServerSocket socket
Constructor Detail

ServerSapTcp

public ServerSapTcp()
Open on any port


ServerSapTcp

public ServerSapTcp(short port)
Open on specific port

Method Detail

finalize

protected void finalize()

init

protected void init(short port)

getProtocol

public int getProtocol()
Description copied from class: ServerSap
What protocol (from SapProtocol)

Specified by:
getProtocol in class ServerSap

accept

public ConnectionSap accept()
Description copied from class: ServerSap
Accept an incoming connection, normally blocking

Specified by:
accept in class ServerSap

close

public void close()
Description copied from class: ServerSap
Close the server socket (no more connections)

Specified by:
close in class ServerSap