 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.server.server;
30 import java.io.IOException;
31 import org.jetbrains.annotations.NotNull;
32 import org.jetbrains.annotations.Nullable;
70 public void stop() throws InterruptedException {
97 public void connect(@NotNull
final String hostname,
final int port) {
void disconnect(@NotNull final String reason)
Disconnects from the server.
void start()
Starts operation.
A socket that processes incoming data.
void connect(@NotNull final String host, final int port)
Connects to a server.
void start()
Starts operation.
One of the two most important classes, ServerConnection performs most of the network-related work.
void writePacket(final byte @NotNull[] buf, final int len, @NotNull final ClientSocketMonitorCommand monitor)
Writes a packet.
void writePacket(final byte @NotNull[] packet, final int length, @NotNull final ClientSocketMonitorCommand monitor)
Writes a Crossfire Message on the socket, so it is sent to the server.
Performs most of the network-related work.
void stop()
Stops operation.
void connect(@NotNull final String hostname, final int port)
Attempts to connect the client to a server.
Maintains the current GuiState.
void addClientSocketListener(@NotNull final ClientSocketListener clientSocketListener)
Adds a ClientSocketListener to notify.
Interface for listeners interested in ClientSocket related events.
final ClientSocket clientSocket
The ClientSocket instance used to connect to Crossfire servers.
void disconnect(@NotNull final String reason, final boolean isError)
Terminates the connection.
Interface for querying monitor commands for script processes.
Writer debug information to a log file.
void stop()
Stops operation.
void addClientSocketListener(@NotNull final ClientSocketListener clientSocketListener)
Adds a ClientSocketListener to be notified.
DefaultServerConnection(@NotNull final GuiStateManager guiStateManager, @Nullable final DebugWriter debugProtocol)
Creates a new instance.
void removeClientSocketListener(@NotNull final ClientSocketListener clientSocketListener)
Removes a ClientSocketListener to be notified.
void removeClientSocketListener(@NotNull final ClientSocketListener clientSocketListener)
Removes a ClientSocketListener to notify.