Package org.takes.rq
Class RqSocket
- java.lang.Object
-
- org.takes.rq.RqWrap
-
- org.takes.rq.RqSocket
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InetAddress
getLocalAddress()
Returns IP address from the X-Takes-LocalAddress header.int
getLocalPort()
Returns port from the X-Takes-LocalPort header.InetAddress
getRemoteAddress()
Returns IP address from the X-Takes-RemoteAddress header.int
getRemotePort()
Returns port from the X-Takes-RemotePort header.
-
-
-
Constructor Detail
-
RqSocket
public RqSocket(Request req)
Ctor.- Parameters:
req
- Original request
-
-
Method Detail
-
getLocalAddress
public InetAddress getLocalAddress() throws IOException
Returns IP address from the X-Takes-LocalAddress header.- Returns:
- Local InetAddress
- Throws:
IOException
- If fails
-
getRemoteAddress
public InetAddress getRemoteAddress() throws IOException
Returns IP address from the X-Takes-RemoteAddress header.- Returns:
- Remote InetAddress
- Throws:
IOException
- If fails
-
getLocalPort
public int getLocalPort() throws IOException
Returns port from the X-Takes-LocalPort header.- Returns:
- Local Port
- Throws:
IOException
- If fails
-
getRemotePort
public int getRemotePort() throws IOException
Returns port from the X-Takes-RemotePort header.- Returns:
- Remote Port
- Throws:
IOException
- If fails
-
-