|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.starhope.vergil.badItalian.SmartFauxClient
public class SmartFauxClient
A nearly drop-in replacement for the basics of porting a SmartFox Server Pro client application to use Appius Claudius Caecus.
| Field Summary | |
|---|---|
private String |
connectedHost
server to which we're connected |
private int |
connectedPort
server port to which we're connected |
private String |
connectedZone
server zone to which we're connected |
private String |
randomKey
random key from server |
boolean |
smartConnect
An ignored public boolean for compatibility purposes. |
private Socket |
socket
Server connection |
| Constructor Summary | |
|---|---|
SmartFauxClient(boolean b)
Constructor |
|
| Method Summary | |
|---|---|
void |
addEventListener(String onconnection,
ISFSEventListener onConnection2)
WRITEME: Document this method brpocock@star-hope.org |
void |
connect(String server)
Connect to a server, trying the default Smart Fox Server port (9339) and the default Appius port (2770). |
void |
connect(String server,
int port)
Connect to a server on a specific port. |
void |
disconnect()
Disconnect from the server, if connected. |
String |
getConnectedHost()
|
int |
getConnectedPort()
|
String |
getConnectedZone()
|
String |
getRandomKey()
WRITEME: Document this method brpocock@star-hope.org |
void |
getRoomList()
fetch and store the room list. |
void |
joinRoom(int i)
WRITEME: Document this method brpocock@star-hope.org |
void |
joinRoom(String roomMoniker,
String roomPassword,
boolean b)
WRITEME: Document this method brpocock@star-hope.org |
void |
login(String string,
String userName,
String string2)
WRITEME: Document this method brpocock@star-hope.org |
void |
logout()
WRITEME: Document this method brpocock@star-hope.org |
void |
sendJson(String string)
WRITEME: Document this method brpocock@star-hope.org |
void |
sendPublicMessage(String string)
WRITEME: Document this method brpocock@star-hope.org |
void |
sendXtMessage(String string,
String string2,
org.json.JSONObject jsonObject)
WRITEME: Document this method brpocock@star-hope.org |
void |
setDebug(boolean b)
WRITEME: Document this method brpocock@star-hope.org |
void |
setUserVariables(Map<String,SFSVariable> vars)
WRITEME: Document this method brpocock@star-hope.org |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public boolean smartConnect
private Socket socket
private String connectedHost
private int connectedPort
private final String connectedZone
private String randomKey
| Constructor Detail |
|---|
public SmartFauxClient(boolean b)
b - Whether to enable debugging mode| Method Detail |
|---|
public void addEventListener(String onconnection,
ISFSEventListener onConnection2)
onconnection - WRITEMEonConnection2 - WRITEME
public void connect(String server)
throws UnknownHostException
server - The server to which to connect.
UnknownHostException - if the server name can't be resolved
public void connect(String server,
int port)
throws UnknownHostException
server - The server to which to connectport - The port number on which to connect. The default for
SmartFox Server is 9339; the default for Appius is
2770.
UnknownHostException - if the given server name can't be
resolvedpublic void disconnect()
public String getConnectedHost()
public int getConnectedPort()
public String getConnectedZone()
public String getRandomKey()
public void getRoomList()
public void joinRoom(int i)
i - WRITEME
public void joinRoom(String roomMoniker,
String roomPassword,
boolean b)
roomMoniker - WRITEMEroomPassword - WRITEMEb - WRITEME
public void login(String string,
String userName,
String string2)
string - WRITEMEuserName - WRITEMEstring2 - WRITEMEpublic void logout()
public void sendJson(String string)
string - WRITEMEpublic void sendPublicMessage(String string)
string - WRITEME
public void sendXtMessage(String string,
String string2,
org.json.JSONObject jsonObject)
string - WRITEMEstring2 - WRITEMEjsonObject - WRITEMEpublic void setDebug(boolean b)
b - WRITEMEpublic void setUserVariables(Map<String,SFSVariable> vars)
vars - WRITEME
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||