ClientPool

trait ClientPool[F[_], ServerBoundPackets <: Tuple, ClientBoundPackets <: Tuple, WorldView]
Companion
object
class Object
trait Matchable
class Any

Type members

Types

final
type Client = SightedClient[F, ServerBoundPackets, ClientBoundPackets, WorldView]

Value members

Abstract methods

def uncachedClientWith(account: Identity): Resource[F, Client]

Create a client that is guaranteed to have Identity as an identity. The acquired client is never cached; it is guaranteed that the client has been disconnected by the time the returned resource went out of scope.

Create a client that is guaranteed to have Identity as an identity. The acquired client is never cached; it is guaranteed that the client has been disconnected by the time the returned resource went out of scope.

Abstract fields

val freshClient: Resource[F, Client]

Resource of a client that is guaranteed to be in a state right after login has completed.

Resource of a client that is guaranteed to be in a state right after login has completed.

This resource is normally much more costly compared to the initialization of recycledClient. If it is not too inconvenient, consider using recycledClient.

This resource may block (semantically) on initialisation if the pool is full.

val freshIdentity: Resource[F, Identity]

A Resource that acquires a new Identity that can be used to create a Client via uncachedClientWith method.

A Resource that acquires a new Identity that can be used to create a Client via uncachedClientWith method.

val recycledClient: Resource[F, Client]

Resource of a client that may have logged in beforehand. If no such client is available, new client will be created and will be connected to the server.

Resource of a client that may have logged in beforehand. If no such client is available, new client will be created and will be connected to the server.

This resource may block (semantically) on initialisation if the pool is full.