SyncShowdownConnection

io.github.pidoveproject.showdown.client.sync.SyncShowdownConnection
class SyncShowdownConnection(runtime: Runtime[ZIOShowdownConnection]) extends ShowdownConnection[String, [e, r] =>> r, [r] =>> (PartialFunction[r, Boolean]) => Unit]

Attributes

Source
SyncShowdownConnection.scala
Graph
Supertypes
trait ShowdownConnection[String, [e, r] =>> r, [r] =>> (PartialFunction[r, Boolean]) => Unit]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def disconnect(): Unit

Disconnect from the server.

Disconnect from the server.

Attributes

Definition Classes
Source
SyncShowdownConnection.scala
override def sendMessage(room: RoomId, message: ClientMessage): 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

Definition Classes
Source
SyncShowdownConnection.scala
override def sendMessage(message: ClientMessage): Unit

Send client-bound message to the server.

Send client-bound message to the server.

Value parameters

message

the message to send

Attributes

Definition Classes
Source
SyncShowdownConnection.scala
override def sendRawMessage(message: String): Unit

Send a socket frame to the server.

Send a socket frame to the server.

Value parameters

message

the socket message to send

Attributes

Definition Classes
Source
SyncShowdownConnection.scala
override def serverMessages: (PartialFunction[Either[ProtocolError, ServerMessage], Boolean]) => Unit

The stream of the received server messages

The stream of the received server messages

Attributes

Definition Classes
Source
SyncShowdownConnection.scala

Inherited methods

def acceptChallenge(): [e, r] =>> r[ProtocolError, Unit]

Accept a challenge

Accept a challenge

Attributes

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def cancelSearch(): [e, r] =>> r[ProtocolError, Unit]

Cancel the match search.

Cancel the match search.

Attributes

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def challengeUser(user: Username, format: FormatName): [e, r] =>> r[ProtocolError, Unit]

Challenge another user

Challenge another user

Value parameters

format

the format of the battle

user

the user to challenge

Attributes

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def confirmLogin(name: Username, assertion: Assertion): [e, r] =>> r[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

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def joinRoom(room: RoomId): [e, r] =>> r[ProtocolError, Unit]

Join a room.

Join a room.

Value parameters

room

the id of the room to join

Attributes

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def leaveRoom(room: RoomId): [e, r] =>> r[ProtocolError, Unit]

Leave a room

Leave a room

Value parameters

room

the id of the room to leave

Attributes

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def logout(): [e, r] =>> r[ProtocolError, Unit]

Disconnect the user

Disconnect the user

Attributes

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def rename(name: Username): [e, r] =>> r[ProtocolError, Unit]

Rename current user.

Rename current user.

Value parameters

name

the new name to take

Attributes

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def resetName(): [e, r] =>> r[ProtocolError, Unit]

Reset current user's name.

Reset current user's name.

Attributes

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def searchBattle(format: FormatName): [e, r] =>> r[ProtocolError, Unit]

Search for a battle

Search for a battle

Value parameters

format

the format to search for

Attributes

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala
def sendPrivateMessage(recipient: Username, message: ChatContent): [e, r] =>> r[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

Inherited from:
ShowdownConnection
Source
ShowdownConnection.scala