public interface SocksHandler extends Runnable
SocksHandler
represents a socket handler.Modifier and Type | Method and Description |
---|---|
void |
doBind(Session session,
CommandMessage commandMessage)
Do BIND command.
|
void |
doConnect(Session session,
CommandMessage commandMessage)
Do CONNECTE command.
|
void |
doUDPAssociate(Session session,
CommandMessage commandMessage)
Do UDP ASSOCIATE command.
|
int |
getBufferSize()
Returns buffer size.
|
int |
getIdleTime()
Returns idle time.
|
MethodSelector |
getMethodSelector()
Returns method selector.
|
List<SocksCommandFilter> |
getSocksCommandFilters()
Returns all socks listeners.
|
void |
handle(Session session)
Handles a session.
|
void |
setBufferSize(int bufferSize)
Sets buffer size.
|
void |
setIdleTime(int idleTime)
Sets idle time.
|
void |
setMethodSelector(MethodSelector methodSelector)
Sets a method selector.
|
void |
setProxy(SocksProxy socksProxy) |
void |
setSession(Session session)
Sets session.
|
void |
setSocksCommandFilters(List<SocksCommandFilter> socksListeners)
Sets socks listeners.
|
void handle(Session session) throws Exception
session
- Session.Exception
- If any error occurred.void doConnect(Session session, CommandMessage commandMessage) throws SocksException, IOException
session
- SessioncommandMessage
- CommandMessage
read from SOCKS client.SocksException
- If a SOCKS protocol error occurred.IOException
- If a I/O error occurred.void doBind(Session session, CommandMessage commandMessage) throws SocksException, IOException
session
- Session.commandMessage
- CommandMessage
read from SOCKS client.SocksException
- If a SOCKS protocol error occurred.IOException
- If a I/O error occurred.void doUDPAssociate(Session session, CommandMessage commandMessage) throws SocksException, IOException
session
- Session.commandMessage
- CommandMessage
read from SOCKS client.SocksException
- If a SOCKS protocol error occurred.IOException
- If a I/O error occurred.void setSession(Session session)
session
- Session.MethodSelector getMethodSelector()
void setMethodSelector(MethodSelector methodSelector)
methodSelector
- A MethodSelector
instance.int getBufferSize()
void setBufferSize(int bufferSize)
bufferSize
- buffer size.List<SocksCommandFilter> getSocksCommandFilters()
void setSocksCommandFilters(List<SocksCommandFilter> socksListeners)
socksListeners
- List of SocksCommandFilter
.int getIdleTime()
void setIdleTime(int idleTime)
idleTime
- Idle time.void setProxy(SocksProxy socksProxy)
Copyright © 2015. All rights reserved.