ShowdownConnection

io.github.pidoveproject.showdown.client.ShowdownConnection
trait ShowdownConnection[Frame, Task[_, _], Stream[_]]

A connection established with a Pokemon Showdown server.

Type parameters

Frame

the type of web socket frame

Stream

the type of a stream

Task

the type of a task

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Members list

Value members

Abstract methods

def disconnect(): Task[ProtocolError, Unit]

Disconnect from the server.

Disconnect from the server.

Attributes

def sendMessage(room: RoomId, message: ClientMessage): Task[ProtocolError, Unit]

Send client-bound message to the server.

Send client-bound message to the server.

Value parameters

message

the message to send

room

the room to send the message to

Attributes

def sendMessage(message: ClientMessage): Task[ProtocolError, Unit]

Send client-bound message to the server.

Send client-bound message to the server.

Value parameters

message

the message to send

Attributes

def sendRawMessage(message: Frame): Task[ProtocolError, Unit]

Send a socket frame to the server.

Send a socket frame to the server.

Value parameters

message

the socket message to send

Attributes

The stream of the received server messages

The stream of the received server messages

Attributes

Concrete methods

def acceptChallenge(): Task[ProtocolError, Unit]

Accept a challenge

Accept a challenge

Attributes

def cancelSearch(): Task[ProtocolError, Unit]

Cancel the match search.

Cancel the match search.

Attributes

def challengeUser(user: Username, format: FormatName): Task[ProtocolError, Unit]

Challenge another user

Challenge another user

Value parameters

format

the format of the battle

user

the user to challenge

Attributes

def confirmLogin(name: Username, assertion: Assertion): Task[ProtocolError, Unit]

Confirm login process by sending the assertion received from ShowdownClient#login or ShowdownClient#loginGuest.

Confirm login process by sending the assertion received from ShowdownClient#login or ShowdownClient#loginGuest.

Value parameters

assertion

the assertion got from the authentication process

name

the username to take

Attributes

def joinRoom(room: RoomId): Task[ProtocolError, Unit]

Join a room.

Join a room.

Value parameters

room

the id of the room to join

Attributes

def leaveRoom(room: RoomId): Task[ProtocolError, Unit]

Leave a room

Leave a room

Value parameters

room

the id of the room to leave

Attributes

def logout(): Task[ProtocolError, Unit]

Disconnect the user

Disconnect the user

Attributes

def rename(name: Username): Task[ProtocolError, Unit]

Rename current user.

Rename current user.

Value parameters

name

the new name to take

Attributes

def resetName(): Task[ProtocolError, Unit]

Reset current user's name.

Reset current user's name.

Attributes

def searchBattle(format: FormatName): Task[ProtocolError, Unit]

Search for a battle

Search for a battle

Value parameters

format

the format to search for

Attributes

def sendPrivateMessage(recipient: Username, message: ChatContent): Task[ProtocolError, Unit]

Send a private message to another player.

Send a private message to another player.

Value parameters

message

the message to send

recipient

the recipient of the message

Attributes