public class Connection extends Object
| Constructor and Description |
|---|
Connection() |
| Modifier and Type | Method and Description |
|---|---|
Socket |
getSocket() |
boolean |
isActive() |
void |
registerHandler(String tag,
MessageHandler handler) |
void |
sendBuffered(String tag,
org.json.JSONObject body) |
void |
sendNow(String tag,
org.json.JSONObject body) |
void |
start(Socket socket) |
void |
stop() |
public Socket getSocket()
public boolean isActive()
public void start(Socket socket)
public void stop()
public void registerHandler(String tag, MessageHandler handler)
public void sendNow(String tag, org.json.JSONObject body) throws org.json.JSONException, IOException
org.json.JSONExceptionIOExceptionpublic void sendBuffered(String tag, org.json.JSONObject body) throws IOException, org.json.JSONException
IOExceptionorg.json.JSONExceptionCopyright © 2017. All Rights Reserved.