public class Server
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
Server.HookList |
| Constructor and Description |
|---|
Server(java.lang.String host,
int port,
boolean use_tls) |
| Modifier and Type | Method and Description |
|---|---|
void |
add_event_hook(ServerListener l)
This is different to the C code since Java has better support for event
listeners.
|
static java.net.Socket |
channel_connect(java.lang.String host,
int port,
java.lang.String handle)
Used by game clients that need to connect themselves.
|
void |
connect() |
void |
create_channel() |
java.net.Socket |
get_channel() |
Game |
get_cur_game() |
Room |
get_cur_room() |
java.lang.String |
get_handle() |
java.lang.String |
get_host() |
GameType |
get_nth_gametype(int num) |
Room |
get_nth_room(int num) |
int |
get_num_gametypes() |
int |
get_num_players() |
int |
get_num_rooms() |
int |
get_port() |
Room |
get_room_by_id(int id) |
StateID |
get_state() |
boolean |
get_tls() |
GameType |
get_type_by_id(int id) |
LoginType |
get_type() |
boolean |
is_at_table() |
boolean |
is_in_room() |
boolean |
is_logged_in() |
boolean |
is_online() |
void |
join_room(int room_num) |
void |
list_gametypes(boolean verbose) |
void |
list_rooms(boolean verbose) |
void |
log_session(java.lang.String sendFile,
java.lang.String receiveFile) |
void |
login() |
void |
logout() |
void |
motd() |
void |
remove_event_hook(ServerListener l)
This is different to the C code since Java has better support for event
listeners.
|
void |
set_logininfo(LoginType type,
java.lang.String handle,
java.lang.String password,
java.lang.String email) |
public void set_logininfo(LoginType type, java.lang.String handle, java.lang.String password, java.lang.String email)
public java.lang.String get_host()
public int get_port()
public Room get_nth_room(int num)
public GameType get_nth_gametype(int num)
public boolean is_online()
public boolean is_logged_in()
public boolean is_in_room()
public boolean is_at_table()
public void connect()
public void create_channel()
public static java.net.Socket channel_connect(java.lang.String host,
int port,
java.lang.String handle)
throws java.io.IOException
host - port - handle - java.io.IOExceptionpublic void login()
throws java.io.IOException
java.io.IOExceptionpublic void motd()
throws java.io.IOException
java.io.IOExceptionpublic void list_rooms(boolean verbose)
throws java.io.IOException
java.io.IOExceptionpublic void list_gametypes(boolean verbose)
throws java.io.IOException
java.io.IOExceptionpublic void join_room(int room_num)
throws java.io.IOException
java.io.IOExceptionpublic void logout()
throws java.io.IOException
java.io.IOExceptionpublic LoginType get_type()
public java.lang.String get_handle()
public java.net.Socket get_channel()
public StateID get_state()
public boolean get_tls()
public int get_num_players()
public int get_num_rooms()
public Room get_cur_room()
public Room get_room_by_id(int id)
public int get_num_gametypes()
public GameType get_type_by_id(int id)
public Game get_cur_game()
public void log_session(java.lang.String sendFile,
java.lang.String receiveFile)
throws java.io.IOException
java.io.IOExceptionpublic void add_event_hook(ServerListener l)
l - public void remove_event_hook(ServerListener l)
l -