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

Source
ShowdownConnection.scala
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

Source
ShowdownConnection.scala
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

Source
ShowdownConnection.scala
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

Source
ShowdownConnection.scala
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

Source
ShowdownConnection.scala

The stream of the received server messages

The stream of the received server messages

Attributes

Source
ShowdownConnection.scala

Concrete methods

def acceptChallenge(): Task[ProtocolError, Unit]

Accept a challenge

Accept a challenge

Attributes

Source
ShowdownConnection.scala
def cancelSearch(): Task[ProtocolError, Unit]

Cancel the match search.

Cancel the match search.

Attributes

Source
ShowdownConnection.scala
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

Source
ShowdownConnection.scala
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

Source
ShowdownConnection.scala
def joinRoom(room: RoomId): Task[ProtocolError, Unit]

Join a room.

Join a room.

Value parameters

room

the id of the room to join

Attributes

Source
ShowdownConnection.scala
def leaveRoom(room: RoomId): Task[ProtocolError, Unit]

Leave a room

Leave a room

Value parameters

room

the id of the room to leave

Attributes

Source
ShowdownConnection.scala
def logout(): Task[ProtocolError, Unit]

Disconnect the user

Disconnect the user

Attributes

Source
ShowdownConnection.scala
def rename(name: Username): Task[ProtocolError, Unit]

Rename current user.

Rename current user.

Value parameters

name

the new name to take

Attributes

Source
ShowdownConnection.scala
def resetName(): Task[ProtocolError, Unit]

Reset current user's name.

Reset current user's name.

Attributes

Source
ShowdownConnection.scala
def searchBattle(format: FormatName): Task[ProtocolError, Unit]

Search for a battle

Search for a battle

Value parameters

format

the format to search for

Attributes

Source
ShowdownConnection.scala
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

Source
ShowdownConnection.scala