net.lenni0451.mcping.pings.sockets.factories.ITCPSocketFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of MCPing Show documentation
Show all versions of MCPing Show documentation
A simple library to ping minecraft servers
The newest version!
package net.lenni0451.mcping.pings.sockets.factories;
import net.lenni0451.mcping.ServerAddress;
import net.lenni0451.mcping.pings.sockets.types.ITCPSocket;
/**
* A factory interface to create a new {@link ITCPSocket} instance.
*/
public interface ITCPSocketFactory {
/**
* Create a new {@link ITCPSocket} instance.
* The socket should not be connected yet.
*
* @param serverAddress The server address to connect to
* @param connectTimeout The connect timeout
* @param readTimeout The read timeout
* @return The connected socket
*/
ITCPSocket create(final ServerAddress serverAddress, final int connectTimeout, final int readTimeout);
}