Click or drag to resize
Local Multiplayer for iOS/tvOS/macOS
AppleLocalMultiplayerISession Interface
Provides access to the local multiplayer session, setting the peer name, service type, getting other peers that are connected to the session.

Namespace:  LostPolygon.Apple.LocalMultiplayer
Syntax
C#
public interface ISession

The AppleLocalMultiplayerISession type exposes the following members.

Properties
  NameDescription
Public propertyIsSessionActive
Whether session is currently active.
Top
Methods
  NameDescription
Public methodGetConnectedPeers
Gets the array of peers that are connected to the session.
Public methodGetConnectedPeers(PeerId)
Gets peers that are connected to the session, and stores them in the provided buffer.
Public methodGetConnectedPeersCount
Gets the number of peers that are connected to the session.
Public methodSetLocalPeerName
Sets the name of the local peer.
Public methodSetServerPort
Sets the server port. Must be called before starting the networking server.
Public methodSetServiceType
Sets the service type identifier.
Public methodStartSession
Starts the session.
Public methodStopSession
Disconnects current device from the session, stops all service advertisers and peer browsers.
Top
Events
  NameDescription
Public eventPeerStateChanged
Occurs when the connection state of a peer has changed.
Public eventStarted
Occurs when session has been started.
Public eventStopped
Occurs when session has been stopped.
Top
See Also