Reactor Connection component for connecting to Reactor server rooms and registering event handlers. More...
Classes | |
struct | ConnectEvent |
Connect event passed to OnConnect event handlers. More... | |
struct | DisconnectEvent |
Disconnect event passed to OnDisconnect event handlers. More... | |
struct | GetRoomsEvent |
Get rooms event passed to OnGetRooms event handlers. More... | |
Public Types | |
enum class | ConnectProtocols { TCP = 0 , RUDP = 2 } |
List of protocols the connection script uses to connect to a server. More... | |
enum class | ConnectModes { ONLINE , REMOTE , LOCAL } |
List of methods the connection script uses to find a server. More... | |
Public Member Functions | |
void | BeginConnect () |
Begin connecting to a room. More... | |
void | Connect (ksRoomInfo roomInfo, params ksMultiType[] connectParams) |
Connect to a room. More... | |
void | Disconnect (bool immediate) |
Disconnect from a connected room. More... | |
Public Attributes | |
bool | ConnectOnStart = true |
ConnectProtocols | ConnectProtocol = ConnectProtocols.TCP |
ConnectModes | ConnectMode = ConnectModes.LOCAL |
string | RemoteHost = "localhost" |
ushort | RemotePort = 8000 |
UnityEvent< GetRoomsEvent > | OnGetRooms = new UnityEvent<GetRoomsEvent>() |
UnityEvent< ConnectEvent > | OnConnect = new UnityEvent<ConnectEvent>() |
UnityEvent< DisconnectEvent > | OnDisconnect = new UnityEvent<DisconnectEvent>() |
ksRoom | Room = null |
|
strong |
List of methods the connection script uses to find a server.
Enumerator | |
---|---|
ONLINE | Use the Reactor API to find and connect to a public server. |
REMOTE | Connect directly to a remote server using a host and port. |
LOCAL | Connect to the localhost using the ksRoomType configuration. |
void KS.Reactor.Client.Unity.ksConnect.BeginConnect | ( | ) |
Begin connecting to a room.
void KS.Reactor.Client.Unity.ksConnect.Connect | ( | ksRoomInfo | roomInfo, |
params ksMultiType[] | connectParams | ||
) |
Connect to a room.
<param name=""roomInfo"">Room connection paremeters. If this is not null then the connect parameters from the component will be used..
void KS.Reactor.Client.Unity.ksConnect.Disconnect | ( | bool | immediate | ) |
Disconnect from a connected room.