C# 클래스 LitDev.LDClient

파일 보기 프로젝트 열기: litdev1/LitDev

공개 메소드들

메소드 설명
CheckServer ( Primitive server ) : Primitive

Test if a server is available for connection. Do not call this method at a high frequency (> 1 per second).

Connect ( Primitive server, Primitive auto ) : Primitive

Connect to a server.

Disconnect ( ) : Primitive

Disconnect the client from the server.

GetClients ( ) : Primitive

Get a list of current connected clients.

SendMessage ( Primitive message ) : Primitive

Send a message to the server.

UpdateDynamic ( Primitive data ) : Primitive

Update client data when using the auto message passing. This is for small quantities of frequently changing data, like sprite coordinates. this method uses the last updated client data stored on the client and is therefore fast.

UpdateStatic ( Primitive data ) : Primitive

Update client data when using the auto message passing. This is for larger quantities of infrequently changing data, like client configuration. This method uses data stored and retrieved from the server so may be slower than UpdateDynamic since it waits for server retreived data, guaranteeing that all client data is fully synced.

비공개 메소드들

메소드 설명
Listen ( ) : void
Send ( string message ) : string
ServerMessageDelegate ( string message ) : void

메소드 상세

CheckServer() 공개 정적인 메소드

Test if a server is available for connection. Do not call this method at a high frequency (> 1 per second).
public static CheckServer ( Primitive server ) : Primitive
server Primitive The server connection ip:port (e.g. "192.168.1.60:100"). /// This value is returned by LDServer.Start.
리턴 Primitive

Connect() 공개 정적인 메소드

Connect to a server.
public static Connect ( Primitive server, Primitive auto ) : Primitive
server Primitive The server connection ip:port (e.g. "192.168.1.60:100"). /// This value is returned by LDServer.Start.
auto Primitive Enable auto message passing "True" or "False". /// If this is used (recommended) then all client data is passed via server to all other clients, /// and no processing of send and receive events is required. /// The data is updated to arrays of data (indexed by client name) that is returned from the Update methods. /// The auto option should be the same for server and all clients.
리턴 Primitive

Disconnect() 공개 정적인 메소드

Disconnect the client from the server.
public static Disconnect ( ) : Primitive
리턴 Primitive

GetClients() 공개 정적인 메소드

Get a list of current connected clients.
public static GetClients ( ) : Primitive
리턴 Primitive

SendMessage() 공개 정적인 메소드

Send a message to the server.
public static SendMessage ( Primitive message ) : Primitive
message Primitive The message may be any variable including an array.
리턴 Primitive

UpdateDynamic() 공개 정적인 메소드

Update client data when using the auto message passing. This is for small quantities of frequently changing data, like sprite coordinates. this method uses the last updated client data stored on the client and is therefore fast.
public static UpdateDynamic ( Primitive data ) : Primitive
data Primitive The data for this client to propagate to other clients.
리턴 Primitive

UpdateStatic() 공개 정적인 메소드

Update client data when using the auto message passing. This is for larger quantities of infrequently changing data, like client configuration. This method uses data stored and retrieved from the server so may be slower than UpdateDynamic since it waits for server retreived data, guaranteeing that all client data is fully synced.
public static UpdateStatic ( Primitive data ) : Primitive
data Primitive The data for this client to propagate to other clients.
리턴 Primitive