Merge NIO into master. I would not recommend this on a production server at all. Its 1.5 anyway.

This commit is contained in:
md_5
2013-03-11 13:29:17 +11:00
63 changed files with 1464 additions and 1437 deletions

View File

@@ -16,4 +16,14 @@ public interface Connection
* @return the remote address
*/
public InetSocketAddress getAddress();
/**
* Disconnects this end of the connection for the specified reason. If this
* is an {@link ProxiedPlayer} the respective server connection will be
* closed too.
*
* @param reason the reason shown to the player / sent to the server on
* disconnect
*/
public void disconnect(String reason);
}

View File

@@ -30,14 +30,6 @@ public interface PendingConnection extends Connection
*/
public InetSocketAddress getVirtualHost();
/**
* Completely kick this user from the proxy and all of its child
* connections.
*
* @param reason the disconnect reason displayed to the player
*/
public void disconnect(String reason);
/**
* Get the listener that accepted this connection.
*

View File

@@ -48,13 +48,6 @@ public interface ProxiedPlayer extends Connection, CommandSender
*/
public int getPing();
/**
* Disconnect (remove) this player from the proxy with the specified reason.
*
* @param reason the reason displayed to the player
*/
public void disconnect(String reason);
/**
* Send a plugin message to this player.
*

View File

@@ -1,7 +1,5 @@
package net.md_5.bungee.api.connection;
import net.md_5.bungee.api.Callback;
import net.md_5.bungee.api.ServerPing;
import net.md_5.bungee.api.config.ServerInfo;
/**
@@ -24,14 +22,4 @@ public interface Server extends Connection
* @param data the data to send
*/
public abstract void sendData(String channel, byte[] data);
/**
* Asynchronously gets the current player count on this server.
*
* @param callback the callback to call when the count has been retrieved.
* @deprecated use the corresponding method in {@link ServerInfo} for
* clarity
*/
@Deprecated
public abstract void ping(Callback<ServerPing> callback);
}