|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object soc.message.SOCMessage soc.message.SOCMessageTemplateJoinGame soc.message.SOCJoinGame
public class SOCJoinGame
This message is used to join any existing game (with or without game options).
It can also be a client asking to create a game
with no game options
.
Server responds to client's request with JOINGAMEAUTH
and sends JOINGAME to all players/observers of the game (including client).
To request a new game with game options, send NEWGAMEWITHOPTIONSREQUEST
instead.
Once the client has successfully joined or created a game or channel, the password field can be left blank in later join/create requests. All server versions ignore the password field after a successful request.
Although this is a game-specific message, it's handled by SOCServer
instead of a GameHandler
.
Field Summary | |
---|---|
private static long |
serialVersionUID
|
Fields inherited from class soc.message.SOCMessageTemplateJoinGame |
---|
game, host, nickname, NULLPASS, password |
Constructor Summary | |
---|---|
SOCJoinGame(java.lang.String nn,
java.lang.String pw,
java.lang.String hn,
java.lang.String ga)
Create a Join Game message. |
Method Summary | |
---|---|
static SOCJoinGame |
parseDataStr(java.lang.String s)
Parse the command String into a JoinGame message |
java.lang.String |
toCmd()
JOINGAME sep nickname sep2 password sep2 host sep2 game |
static java.lang.String |
toCmd(java.lang.String nn,
java.lang.String pw,
java.lang.String hn,
java.lang.String ga)
JOINGAME sep nickname sep2 password sep2 host sep2 game |
java.lang.String |
toString()
Simple human-readable representation, used for debug purposes. |
Methods inherited from class soc.message.SOCMessageTemplateJoinGame |
---|
getGame, getHost, getNickname, getPassword, toString |
Methods inherited from class soc.message.SOCMessage |
---|
arrayIntoStringBuf, enumIntoStringBuf, getClassNameShort, getMaximumVersion, getMinimumVersion, getType, isSingleLineAndSafe, isSingleLineAndSafe, toMsg |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final long serialVersionUID
Constructor Detail |
---|
public SOCJoinGame(java.lang.String nn, java.lang.String pw, java.lang.String hn, java.lang.String ga)
nn
- nicknamepw
- optional password, or "" if nonehn
- server host name to which client is connectingga
- name of the gameMethod Detail |
---|
public java.lang.String toCmd()
toCmd
in class SOCMessage
public static java.lang.String toCmd(java.lang.String nn, java.lang.String pw, java.lang.String hn, java.lang.String ga)
nn
- the nicknamepw
- the optional password, or "" if nonehn
- the server host name to which client is connectingga
- the game name
public static SOCJoinGame parseDataStr(java.lang.String s)
s
- the String to parse
public java.lang.String toString()
SOCMessage
toString
in class SOCMessage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |