equip.net
Class ServerSapUdp

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

public class ServerSapUdp
extends ServerSap

Concrete Implementation of ServerSap using JCP (Jim's Communication Protocol)


Field Summary
protected  java.net.DatagramSocket socket
           
 
Fields inherited from class equip.net.ServerSap
address, port, status
 
Constructor Summary
ServerSapUdp()
          Open on any port
ServerSapUdp(short port)
          Open on specified 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.DatagramSocket socket
Constructor Detail

ServerSapUdp

public ServerSapUdp()
Open on any port


ServerSapUdp

public ServerSapUdp(short port)
Open on specified 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