KS.Reactor.ksRoomInfo Class Reference

Holds room data that is available without connecting to the room, including data required to connect to the room. More...

Inheritance diagram for KS.Reactor.ksRoomInfo:
KS.Reactor.ksIBufferable

Public Types

enum class  RoomState { STARTING = 0 , RUNNING = 1 , STOPPING = 2 }
 Room load state. More...
 

Public Member Functions

 ksRoomInfo ()
 Constructor. More...
 
 ksRoomInfo (ksRoomInfo copy)
 Copy Constructor. More...
 
 ksRoomInfo (string host, ushort port)
 Constructor. More...
 
ksAddress GetAddress (ksConnectionProtocols protocol)
 Gets the address for a protocol. More...
 
void SetAddress (ksConnectionProtocols protocol, ksAddress address)
 Sets the address for a protocol. More...
 
ksJSON ToJSON ()
 Creates a ksJSON object of this room info. More...
 
byte[] GetBytes ()
 Serializes the room info to a byte array. More...
 
void FromBytes (byte[] data)
 Deserializes the room info from a byte array. More...
 
override string ToString ()
 Returns a brief summary of the ksRoomInfo object including id, scene and room type. More...
 

Static Public Member Functions

static ksRoomInfo FromJSON (ksJSON json)
 Initialize the room info using a json. More...
 
static implicit operator ksMultiType (ksRoomInfo info)
 Implicit conversion from ksRoomInfo to ksMultiType. More...
 
static implicit operator ksRoomInfo (ksMultiType multiType)
 Implicit conversion from ksMultiType to ksRoomInfo. More...
 

Properties

uint Image [get, set]
 Image. More...
 
uint Id [get, set]
 Room id. More...
 
string Scene [get, set]
 Scene name. More...
 
string Type [get, set]
 Room type. More...
 
string Host [get, set]
 Host to connect to. More...
 
ushort Port [get, set]
 Port to connect to. More...
 
string Name [get, set]
 Room name. More...
 
bool IsPublic [get, set]
 Is public? More...
 
RoomState State [get, set]
 Server state. More...
 
ksHashSet< string > PublicTags [get, set]
 Public tags. More...
 
ksJSON PublicData [get, set]
 Public data. More...
 

Detailed Description

Holds room data that is available without connecting to the room, including data required to connect to the room.

Member Enumeration Documentation

◆ RoomState

Room load state.

Constructor & Destructor Documentation

◆ ksRoomInfo() [1/3]

KS.Reactor.ksRoomInfo.ksRoomInfo ( )

Constructor.

◆ ksRoomInfo() [2/3]

KS.Reactor.ksRoomInfo.ksRoomInfo ( ksRoomInfo  copy)

Copy Constructor.

Parameters
copyRoom info to copy from.

◆ ksRoomInfo() [3/3]

KS.Reactor.ksRoomInfo.ksRoomInfo ( string  host,
ushort  port 
)

Constructor.

Parameters
hostHost to connect to.
portPort to connect to.

Member Function Documentation

◆ FromBytes()

void KS.Reactor.ksRoomInfo.FromBytes ( byte[]  data)

Deserializes the room info from a byte array.

Parameters
dataData to deserialize.

Implements KS.Reactor.ksIBufferable.

◆ FromJSON()

static ksRoomInfo KS.Reactor.ksRoomInfo.FromJSON ( ksJSON  json)
static

Initialize the room info using a json.

Parameters
json
Returns
False if the json failed to contain the required fields.

◆ GetAddress()

ksAddress KS.Reactor.ksRoomInfo.GetAddress ( ksConnectionProtocols  protocol)

Gets the address for a protocol.

Parameters
protocolProtocol to get address for.
Returns
Address for the protocol.

◆ GetBytes()

byte [] KS.Reactor.ksRoomInfo.GetBytes ( )

Serializes the room info to a byte array.

Returns
Serialized room info.

Implements KS.Reactor.ksIBufferable.

◆ operator ksMultiType()

static implicit KS.Reactor.ksRoomInfo.operator ksMultiType ( ksRoomInfo  info)
static

Implicit conversion from ksRoomInfo to ksMultiType.

Parameters
info

◆ operator ksRoomInfo()

static implicit KS.Reactor.ksRoomInfo.operator ksRoomInfo ( ksMultiType  multiType)
static

Implicit conversion from ksMultiType to ksRoomInfo.

Parameters
multiType

◆ SetAddress()

void KS.Reactor.ksRoomInfo.SetAddress ( ksConnectionProtocols  protocol,
ksAddress  address 
)

Sets the address for a protocol.

If the address is invalid, clears the address for the protocol.

Parameters
protocolThe protocol to set the address for.
addressAddress to set. If invalid, clears the address for the protocol.

◆ ToJSON()

ksJSON KS.Reactor.ksRoomInfo.ToJSON ( )

Creates a ksJSON object of this room info.

Returns

◆ ToString()

override string KS.Reactor.ksRoomInfo.ToString ( )

Returns a brief summary of the ksRoomInfo object including id, scene and room type.

Returns

Property Documentation

◆ Host

string KS.Reactor.ksRoomInfo.Host
getset

Host to connect to.

◆ Id

uint KS.Reactor.ksRoomInfo.Id
getset

Room id.

◆ Image

uint KS.Reactor.ksRoomInfo.Image
getset

Image.

◆ IsPublic

bool KS.Reactor.ksRoomInfo.IsPublic
getset

Is public?

◆ Name

string KS.Reactor.ksRoomInfo.Name
getset

Room name.

◆ Port

ushort KS.Reactor.ksRoomInfo.Port
getset

Port to connect to.

◆ PublicData

ksJSON KS.Reactor.ksRoomInfo.PublicData
getset

Public data.

◆ PublicTags

ksHashSet<string> KS.Reactor.ksRoomInfo.PublicTags
getset

Public tags.

◆ Scene

string KS.Reactor.ksRoomInfo.Scene
getset

Scene name.

◆ State

RoomState KS.Reactor.ksRoomInfo.State
getset

Server state.

◆ Type

string KS.Reactor.ksRoomInfo.Type
getset

Room type.