soc.server.genericServer
Interface StringServerSocket

All Known Implementing Classes:
LocalStringServerSocket, Server.NetStringServerSocket

public interface StringServerSocket

StringServerSocket allows server applications to communicate with clients, with no difference between local and actual networked traffic.

  1.0.0 - 2007-11-18 - initial release
  1.0.3 - 2008-08-08 - add change history; no other changes in this file since 1.0.0
  1.0.4 - 2008-09-04 - no change in this file
  1.0.5 - 2009-05-31 - no change in this file
  1.0.5.1- 2009-10-26- remove unused import EOFException

Version:
1.0.5.1
Author:
Jeremy D Monin

Method Summary
 StringConnection accept()
          For server to call.
 void close()
          Close down server socket immediately: Do not let inbound data drain.
 

Method Detail

accept

StringConnection accept()
                        throws java.net.SocketException,
                               java.io.IOException
For server to call. Blocks waiting for next inbound connection.

Returns:
The server-side peer to the inbound client connection
Throws:
java.io.IOException - if network has a problem accepting
java.net.SocketException - if our setEOF() has been called, thus new clients won't receive any data from us

close

void close()
           throws java.io.IOException
Close down server socket immediately: Do not let inbound data drain. Accept no new inbound connections. Send EOF marker in all current outbound connections. Like java.net.ServerSocket, any thread currently blocked in accept() must throw a SocketException.

Throws:
java.io.IOException