Service Class

Alteruna service class.

Definition

Namespace: Alteruna.Multiplayer.Core
Assembly: Alteruna.Multiplayer (in Alteruna.Multiplayer.dll) Version: 2.1.3+c5328b35489e83c42e288435f5acf6115fd519e0
C#
public class Service
Inheritance
Object    Service

Constructors

Properties

AvailableRooms Known available rooms.
BroadcastReceiveEnabled Get or set of broadcast are received. Used for descending room in local network.
CurrentRoom Get room you are in.
Host Indicates whether the current service instance is hosting a session.
Initialized Indicates whether the service has been initialized.
InRoom Get if you are currently in a room.
InRoomOrJoining Get if you are currently or soon in a room
IsAuthenticated Get if the project is authenticated.
IsConnected Get if connected to an endpoint.
IsConnecting Get if currently connecting to an endpoint.
Log Set the logging system to capture and manage log events for multiplayer services.
ProjectID 
PublishAvailabilityPort Port used to broadcast land discoverability
SimulateLatency Simulate latency by holding incoming packets for a random time. (Only takes effect with TransportType.DefaultStatistics)
SimulatePacketLoss Simulate packet loss by dropping random incoming packets. (Only takes effect with TransportType.DefaultStatistics)
SimulationMaxLatency Maximum simulated latency, in milliseconds.
SimulationMinLatency Minimum simulated latency, in milliseconds.
SimulationPacketLossChance Chance of packet loss when simulation is enabled, in percent (0 - 100).
TransportBytesReceived Total number of bytes received by the transport. 0 unless the current transport implements INetworkStatistics (TransportType.DefaultStatistics).
TransportBytesSent Total number of bytes sent by the transport. 0 unless the current transport implements INetworkStatistics (TransportType.DefaultStatistics).
TransportPacketLoss Total number of packets detected as lost. 0 unless the current transport implements INetworkStatistics (TransportType.DefaultStatistics).
TransportPacketLossPercent Packet loss as a percentage (0 - 100) of packets sent. 0 unless the current transport implements INetworkStatistics (TransportType.DefaultStatistics).
TransportPacketsReceived Total number of packets received by the transport. 0 unless the current transport implements INetworkStatistics (TransportType.DefaultStatistics).
TransportPacketsSent Total number of packets sent by the transport. 0 unless the current transport implements INetworkStatistics (TransportType.DefaultStatistics).
UserInfo Local user's name and id.

Methods

AddKnownDevice Adds a known device to the service for connection purposes.
ClosePort Closes the communication port and stops the device manager.
CreateRoom(RoomArgs) 
CreateRoom(String, UInt16, Boolean, UInt16, Boolean, Boolean) Create a new room.
Obsolete.
DestroyRoom 
DestroyRoom(Room) 
DestroyRoom(UInt32) 
GetLastBlockResponse 
InvokeRemoteProcedure 
JoinMatchmaking Join a Room through matchmaking using a pin.
JoinOnDemandRoom Create and Join a Room. The Room will close when the last player leaves the room.
JoinOnDemandRoom(UInt32, Int32) Join Room by id. The Room will close when the last player leaves the room.
JoinOwnRoom Join local room.
JoinRoom Joins the specified room using the provided PIN for authentication.
KickUser Kick user from current room.
LeaveCurrentRoom Send to leave request to current room.
LockRoom Lock current room.
MulticastRemoteProcedure Invoke a Remote Procedure Call (RPC) for multiple Users.
OnSessionCreated 
OpenPort Opens the communication port and initializes the device manager with the specified settings.
RefreshAvailableRooms Refresh Available Rooms using
RefreshAvailableRooms(ServiceRefreshAvailableRoomsMode, ServiceRefreshAvailableRoomsArgs) Refresh the AvailableRooms list containing the currently available Rooms on the server.
RegisterRemoteProcedure Register a Remote Procedure.
ReplyRemoteProcedure Reply to a Remote Procedure Called by another User.
SetRoomName Rename currently joined room.
SetUsername Sets the username for the current user in the multiplayer system.
Start(IServiceListener, LogBase) 
Start(IServiceListener, ServiceServiceArgs) 
Start(IServiceEventListener, IServiceStateListener, LogBase) 
Start(IServiceEventListener, IServiceStateListener, ServiceServiceArgs) 
StartRemoteServer 
Stop Stop service.
Sync(ISynchronizableElement) Serialize and route a package.
Sync(ISynchronizableElement, User, Reliability) Serialize and route a package.
Sync(ISynchronizableElement, UserId, Reliability) Serialize and route a package.
Sync(ISynchronizableElement, ListUInt16, Reliability) Serialize and route a package.
Sync(ISynchronizableElement, UInt16, Reliability) Serialize and route a package.
TryLockResource Attempt to gain ownership of a Synchronizable with the specified UniqueID.
UnlockResource Release ownership of the Synchronizable with the specified UniqueID.
UnlockRoom Unlock current room.
Update 
VerifyProjectID(Guid, NullableGuid, Boolean) 
VerifyProjectID(String, String, Boolean) 
WaitLockResource Wait until the Synchronizable with the specified UniqueID becomes available for ownership.

Events

TransportStarted Invoked right after the transport layer has (re)started. Anything that needs to configure the transport (e.g. network simulation settings) should hook this instead of racing the start sequence.

Fields

See Also