ggz.client.core
Class Server
java.lang.Object
ggz.client.core.Server
public class Server
- extends java.lang.Object
Constructor Summary |
Server(java.lang.String host,
int port,
boolean use_tls)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Server
public Server(java.lang.String host,
int port,
boolean use_tls)
set_logininfo
public void set_logininfo(LoginType type,
java.lang.String handle,
java.lang.String password,
java.lang.String email)
get_host
public java.lang.String get_host()
get_port
public int get_port()
get_nth_room
public Room get_nth_room(int num)
get_nth_gametype
public GameType get_nth_gametype(int num)
is_online
public boolean is_online()
is_logged_in
public boolean is_logged_in()
is_in_room
public boolean is_in_room()
is_at_table
public boolean is_at_table()
connect
public void connect()
create_channel
public void create_channel()
channel_connect
public static java.net.Socket channel_connect(java.lang.String host,
int port,
java.lang.String handle)
throws java.io.IOException
- Used by game clients that need to connect themselves.
- Parameters:
host
- port
- handle
-
- Returns:
- the socket that connects the game server with the game client.
- Throws:
java.io.IOException
login
public void login()
throws java.io.IOException
- Throws:
java.io.IOException
motd
public void motd()
throws java.io.IOException
- Throws:
java.io.IOException
list_rooms
public void list_rooms(boolean verbose)
throws java.io.IOException
- Throws:
java.io.IOException
list_gametypes
public void list_gametypes(boolean verbose)
throws java.io.IOException
- Throws:
java.io.IOException
join_room
public void join_room(int room_num)
throws java.io.IOException
- Throws:
java.io.IOException
logout
public void logout()
throws java.io.IOException
- Throws:
java.io.IOException
get_type
public LoginType get_type()
get_handle
public java.lang.String get_handle()
get_channel
public java.net.Socket get_channel()
get_state
public StateID get_state()
get_tls
public boolean get_tls()
get_num_players
public int get_num_players()
get_num_rooms
public int get_num_rooms()
get_cur_room
public Room get_cur_room()
get_room_by_id
public Room get_room_by_id(int id)
get_num_gametypes
public int get_num_gametypes()
get_type_by_id
public GameType get_type_by_id(int id)
get_cur_game
public Game get_cur_game()
log_session
public void log_session(java.lang.String sendFile,
java.lang.String receiveFile)
throws java.io.IOException
- Throws:
java.io.IOException
add_event_hook
public void add_event_hook(ServerListener l)
- This is different to the C code since Java has better support for event
listeners.
- Parameters:
l
-
remove_event_hook
public void remove_event_hook(ServerListener l)
- This is different to the C code since Java has better support for event
listeners.
- Parameters:
l
-