C# 클래스 Indiefreaks.Xna.Sessions.Lidgren.LidgrenSession

파일 보기 프로젝트 열기: Indiefreaks/igf 1 사용 예제들

공개 메소드들

메소드 설명
EndSession ( ) : void

Ends the Session and changes its SessionState from Playing to Ended

ExecuteCommandOnServer ( Command command ) : void

Asks the Session to send a remote command call on the session host

ExecuteServerCommandOnClients ( Command command ) : void

Asks the Session to send a remote command call on all session clients

ListenIncoming ( ) : void

Listens to all data received from the network interface

OnClosed ( ) : void

Closes the Session and changes its SessionState to Closed

StartSession ( ) : void

Starts the Session and changes its SessionState from Lobby to Playing

SynchronizeCommandOnClients ( Command command ) : void
SynchronizeSceneEntitiesOnClients ( ISceneEntity sceneEntity ) : void
Update ( GameTime gameTime ) : void

Update loop call

보호된 메소드들

메소드 설명
NotifyServerSynchronizationDoneOnClient ( ) : void

Notifies the server that the synchronization with the server is performed locally

비공개 메소드들

메소드 설명
AddNewPlayersOnServer ( ) : List
BeginCreate ( string serverHost, SessionType sessionType, int maxLocalGamers, int maxGamers, int privateReservedSlots, SessionProperties sessionProperties, AsyncCallback callback, object asyncState ) : IAsyncResult
BeginFind ( SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties, AsyncCallback callback, object asyncState ) : IAsyncResult
BeginFindWan ( SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties, string host, int port, AsyncCallback callback, object asyncState ) : IAsyncResult
BeginJoin ( LidgrenAvailableSession availableSession, AsyncCallback callback, object asyncState ) : IAsyncResult
ConvertToNetDeliveryMethod ( DataTransferOptions dataTransferOptions ) : NetDeliveryMethod

Converts DataTransferOptions to NetDeliveryOptions

Create ( string serverHost, SessionType sessionType, int maxGamers, int privateReservedSlots, SessionProperties sessionProperties, bool isHost ) : LidgrenSession
EndCreate ( IAsyncResult result ) : LidgrenSession
EndCreateOrJoin ( IAsyncResult result ) : LidgrenSession
EndFind ( IAsyncResult result ) : List
EndJoin ( IAsyncResult result ) : LidgrenSession
Find ( SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties, string host = null, int port = LidgrenSessionManager.ServerPort ) : List
Join ( LidgrenAvailableSession availableSession ) : LidgrenSession
LidgrenSession ( SessionType sessionType, int maxGamers, int privateReservedSlots, SessionProperties sessionProperties ) : System

This constructor is used to create a temporary session exclusivly for the purpose of listening for Discovery messages

LidgrenSession ( string serverHost, SessionType sessionType, int maxGamers, int privateReservedSlots, SessionProperties sessionProperties, bool isHost ) : System
ProcessClientMessages ( ) : void
ProcessServerMessages ( ) : void
RetrieveCommandsFromServer ( ) : void
RetrieveDisconnectedPlayersFromServer ( ) : void
RetrieveNewPlayersFromServer ( ) : void
RetrieveRemotePlayersFromServer ( ) : void
RetrieveSceneEntitiesFromServer ( ) : void
RetrieveSessionStateChangedFromServer ( ) : void
SendAllLocalPlayersToServer ( ) : void
SendDisconnectedPlayersToClients ( List playersToRemove ) : void
SendNewPlayersToClients ( List clientPlayers ) : void
SendPlayersListToJustConnectedClient ( ) : void
SendSessionStateChangedToClients ( ) : void
WriteNetworkValue ( NetOutgoingMessage &outgoingMessage, object networkValue ) : void

메소드 상세

EndSession() 공개 메소드

Ends the Session and changes its SessionState from Playing to Ended
public EndSession ( ) : void
리턴 void

ExecuteCommandOnServer() 공개 메소드

Asks the Session to send a remote command call on the session host
public ExecuteCommandOnServer ( Command command ) : void
command Indiefreaks.Xna.Logic.Command The command that should be executed
리턴 void

ExecuteServerCommandOnClients() 공개 메소드

Asks the Session to send a remote command call on all session clients
public ExecuteServerCommandOnClients ( Command command ) : void
command Indiefreaks.Xna.Logic.Command The command that should be executed
리턴 void

ListenIncoming() 공개 메소드

Listens to all data received from the network interface
public ListenIncoming ( ) : void
리턴 void

NotifyServerSynchronizationDoneOnClient() 보호된 메소드

Notifies the server that the synchronization with the server is performed locally
protected NotifyServerSynchronizationDoneOnClient ( ) : void
리턴 void

OnClosed() 공개 메소드

Closes the Session and changes its SessionState to Closed
public OnClosed ( ) : void
리턴 void

StartSession() 공개 메소드

Starts the Session and changes its SessionState from Lobby to Playing
public StartSession ( ) : void
리턴 void

SynchronizeCommandOnClients() 공개 메소드

public SynchronizeCommandOnClients ( Command command ) : void
command Indiefreaks.Xna.Logic.Command
리턴 void

SynchronizeSceneEntitiesOnClients() 공개 메소드

public SynchronizeSceneEntitiesOnClients ( ISceneEntity sceneEntity ) : void
sceneEntity ISceneEntity
리턴 void

Update() 공개 메소드

Update loop call
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
리턴 void