public class PLServerSocket
extends java.lang.Object
Constructor and Description |
---|
PLServerSocket()
Server socket creation.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public PLServerSocket() throws java.io.IOException
java.io.IOException
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.