[][src]Module screeps_api::websocket

Handling of socket connections to screeps using ws-rs as a backend.

Modules

commands

Websocket command creation.

flags

Types for user flags which can appear in rooms.

objects

Room object parsing.

resources

Managing and parsing resource

room_object_macros

Module containing macros which simplify making "updateable" structures.

Structs

Message

Content of a newly sent or received message update.

MessageUnreadUpdate

Update on whether a message is unread or not.

MessageUpdate

Update for a newly received message.

RoomMapViewUpdate

"Map view" room status update. This contains all entities in a given room, organized by what type of thing they are, or who owns them.

RoomUpdate

Update for detailed room information.

RoomUpdateInfo

"info" struct to go with room update.

RoomUserInfo

Information on a user which is packaged with a room update.

RoomUserInfoUpdate

The update structure for RoomUpdateUserInfo

UserCpuUpdate

Notification for Update for a user's last tick CPU usage and total memory usage.

Enums

Channel

Different channels one can subscribe to.

ChannelUpdate

An update to a Screeps server 'channel' that has been subscribed to.

ConversationUpdate

Update on a conversation between two specific users. This is either a new message sent by one of the users (either the subscribed one or the other one), or an update indicating that a message previously sent has now been read.

MessageDirectionType

Specification on whether a message is incoming or outgoing.

ParseError

A SockJS parse error occurred. TODO: more detailed info.

ScreepsMessage

A parsed message.

SockjsMessage

Result of parsing a raw message.

UserConsoleUpdate

Update for a user's log messages during the last tick.

Functions

default_url

Creates a new (random) websocket URL to connect to the official server.

transform_url

Method for finding a websocket URL given the screeps API URL.