|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCiaoJava.PLServerSocket
This class creates a server socket and keeps it listening at socket port #5000 (or number given in constructor).
Constructor Summary | |
PLServerSocket()
Server socket creation. |
Method Summary | |
int |
getPort()
Returns de port number on which the PLServerSocket object
is listening. |
protected static java.io.BufferedReader |
getReader(java.net.Socket s)
Returns the BufferedReader input stream for this
socket connection. |
protected static java.io.PrintWriter |
getWriter(java.net.Socket s)
Returns the PrintWriter output stream for this socket connection. |
java.net.Socket |
openSocket()
Accepts a client request for this socket port. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PLServerSocket() throws java.io.IOException
Method Detail |
public java.net.Socket openSocket() throws java.io.IOException
Socket
object that represents the
connection accepted.
java.io.IOException
protected static java.io.BufferedReader getReader(java.net.Socket s) throws java.io.IOException
BufferedReader
input stream for this
socket connection. If the socket isn't opened, returns null
.
s
- Socket
object from which the stream reader
is to be obtained.
BufferedReader
object that represents
the reader of the socket received as argument.
java.io.IOException
protected static java.io.PrintWriter getWriter(java.net.Socket s) throws java.io.IOException
s
- Socket
object from which the stream writer
is to be obtained.
PrintWriter
object that represents
the writer of the socket received as argument.
java.io.IOException
public int getPort()
PLServerSocket
object
is listening.
PLServerSocket
object is listening.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |