C# 클래스 Fun.FunapiNetwork

파일 보기 프로젝트 열기: iFunFactory/demo-kgc-2015 1 사용 예제들

공개 메소드들

메소드 설명
AttachTransport ( FunapiTransport transport ) : void
Connect ( TransportProtocol protocol, FunEncoding type, Fun.HostAddr addr ) : bool
CreateFunMessage ( object msg, MessageType msg_type ) : FunMessage
DetachTransport ( TransportProtocol protocol ) : void
FunapiNetwork ( bool session_reliability = false ) : UnityEngine
GetDefaultProtocol ( ) : TransportProtocol
GetEncoding ( TransportProtocol protocol ) : FunEncoding
GetMessage ( FunMessage msg, MessageType msg_type ) : object
GetMessageProtocol ( string msg_type ) : TransportProtocol
GetTransport ( TransportProtocol protocol ) : FunapiTransport
HasTransport ( TransportProtocol protocol ) : bool
LastErrorCode ( TransportProtocol protocol ) : ErrorCode
LastErrorMessage ( TransportProtocol protocol ) : string
Reconnect ( TransportProtocol protocol ) : bool
Redirect ( TransportProtocol protocol, Fun.HostAddr addr, bool keep_session_id = false ) : bool
RegisterHandler ( string type, MessageEventHandler handler ) : void
RegisterHandlerWithProtocol ( string type, TransportProtocol protocol, MessageEventHandler handler ) : void
SendMessage ( MessageType msg_type, object message, EncryptionType encryption = EncryptionType.kDefaultEncryption, TransportProtocol protocol = TransportProtocol.kDefault, string expected_reply_type = null, float expected_reply_time = 0f, TimeoutEventHandler onReplyMissed = null ) : void
SendMessage ( MessageType msg_type, object message, string expected_reply_type, float expected_reply_time, TimeoutEventHandler onReplyMissed ) : void
SendMessage ( string msg_type, object message, EncryptionType encryption = EncryptionType.kDefaultEncryption, TransportProtocol protocol = TransportProtocol.kDefault, string expected_reply_type = null, float expected_reply_time = 0f, TimeoutEventHandler onReplyMissed = null ) : void
SendMessage ( string msg_type, object message, string expected_reply_type, float expected_reply_time, TimeoutEventHandler onReplyMissed ) : void
SetDefaultProtocol ( TransportProtocol protocol ) : void
SetMessageProtocol ( TransportProtocol protocol, string msg_type ) : void
Start ( ) : void
StartTransport ( TransportProtocol protocol ) : void
Stop ( bool clear_all = true ) : void
StopTransport ( TransportProtocol protocol ) : void
Update ( ) : void

비공개 메소드들

메소드 설명
AddExpectedReply ( FunapiMessage fun_msg, string reply_type, float reply_time, TimeoutEventHandler onReplyMissed ) : void
CheckTransportConnection ( TransportProtocol protocol ) : void
CloseSession ( ) : void
DeleteExpectedReply ( string reply_type ) : void
FindOtherTransport ( TransportProtocol protocol ) : FunapiTransport
InitSession ( ) : void
OnAckReceived ( FunapiTransport transport, UInt32 ack ) : void
OnClientPingMessage ( FunapiTransport transport, object body ) : void
OnConnectTimeout ( TransportProtocol protocol ) : void
OnMaintenanceMessage ( string msg_type, object body ) : void
OnNewSession ( string msg_type, object body ) : void
OnPingTimerEvent ( object param ) : void
OnSeqReceived ( FunapiTransport transport, UInt32 seq ) : bool
OnServerPingMessage ( FunapiTransport transport, object body ) : void
OnSessionTimedout ( string msg_type, object body ) : void
OnStoppedAllTransportCallback ( ) : void
OnTransportConnectFailure ( TransportProtocol protocol ) : void
OnTransportDisconnected ( TransportProtocol protocol ) : void
OnTransportFailure ( TransportProtocol protocol, FunapiMessage fun_msg ) : void
OnTransportReceived ( TransportProtocol protocol, string>.Dictionary header, ArraySegment body ) : void
OnTransportStarted ( TransportProtocol protocol ) : void
OnTransportStopped ( TransportProtocol protocol ) : void
OpenSession ( string session_id ) : void
PrepareSession ( string session_id ) : void
ProcessMessage ( TransportProtocol protocol, ArraySegment buffer ) : void
SendAck ( FunapiTransport transport, UInt32 ack ) : void
SendEmptyMessage ( TransportProtocol protocol ) : void
SendPingMessage ( FunapiTransport transport ) : void
SendUnsentMessages ( ) : void
SeqLess ( UInt32 x, UInt32 y ) : bool
SetTransportStarted ( FunapiTransport transport, bool send_unsent = true ) : void
StartPingTimer ( FunapiTransport transport ) : void
StartTransport ( FunapiTransport transport ) : void
StopPingTimer ( FunapiTransport transport ) : void
StopTransport ( FunapiTransport transport ) : void

메소드 상세

AttachTransport() 공개 메소드

public AttachTransport ( FunapiTransport transport ) : void
transport FunapiTransport
리턴 void

Connect() 공개 메소드

public Connect ( TransportProtocol protocol, FunEncoding type, Fun.HostAddr addr ) : bool
protocol TransportProtocol
type FunEncoding
addr Fun.HostAddr
리턴 bool

CreateFunMessage() 공개 메소드

public CreateFunMessage ( object msg, MessageType msg_type ) : FunMessage
msg object
msg_type MessageType
리턴 FunMessage

DetachTransport() 공개 메소드

public DetachTransport ( TransportProtocol protocol ) : void
protocol TransportProtocol
리턴 void

FunapiNetwork() 공개 메소드

public FunapiNetwork ( bool session_reliability = false ) : UnityEngine
session_reliability bool
리턴 UnityEngine

GetDefaultProtocol() 공개 메소드

public GetDefaultProtocol ( ) : TransportProtocol
리턴 TransportProtocol

GetEncoding() 공개 메소드

public GetEncoding ( TransportProtocol protocol ) : FunEncoding
protocol TransportProtocol
리턴 FunEncoding

GetMessage() 공개 메소드

public GetMessage ( FunMessage msg, MessageType msg_type ) : object
msg FunMessage
msg_type MessageType
리턴 object

GetMessageProtocol() 공개 메소드

public GetMessageProtocol ( string msg_type ) : TransportProtocol
msg_type string
리턴 TransportProtocol

GetTransport() 공개 메소드

public GetTransport ( TransportProtocol protocol ) : FunapiTransport
protocol TransportProtocol
리턴 FunapiTransport

HasTransport() 공개 메소드

public HasTransport ( TransportProtocol protocol ) : bool
protocol TransportProtocol
리턴 bool

LastErrorCode() 공개 메소드

public LastErrorCode ( TransportProtocol protocol ) : ErrorCode
protocol TransportProtocol
리턴 ErrorCode

LastErrorMessage() 공개 메소드

public LastErrorMessage ( TransportProtocol protocol ) : string
protocol TransportProtocol
리턴 string

Reconnect() 공개 메소드

public Reconnect ( TransportProtocol protocol ) : bool
protocol TransportProtocol
리턴 bool

Redirect() 공개 메소드

public Redirect ( TransportProtocol protocol, Fun.HostAddr addr, bool keep_session_id = false ) : bool
protocol TransportProtocol
addr Fun.HostAddr
keep_session_id bool
리턴 bool

RegisterHandler() 공개 메소드

public RegisterHandler ( string type, MessageEventHandler handler ) : void
type string
handler MessageEventHandler
리턴 void

RegisterHandlerWithProtocol() 공개 메소드

public RegisterHandlerWithProtocol ( string type, TransportProtocol protocol, MessageEventHandler handler ) : void
type string
protocol TransportProtocol
handler MessageEventHandler
리턴 void

SendMessage() 공개 메소드

public SendMessage ( MessageType msg_type, object message, EncryptionType encryption = EncryptionType.kDefaultEncryption, TransportProtocol protocol = TransportProtocol.kDefault, string expected_reply_type = null, float expected_reply_time = 0f, TimeoutEventHandler onReplyMissed = null ) : void
msg_type MessageType
message object
encryption EncryptionType
protocol TransportProtocol
expected_reply_type string
expected_reply_time float
onReplyMissed TimeoutEventHandler
리턴 void

SendMessage() 공개 메소드

public SendMessage ( MessageType msg_type, object message, string expected_reply_type, float expected_reply_time, TimeoutEventHandler onReplyMissed ) : void
msg_type MessageType
message object
expected_reply_type string
expected_reply_time float
onReplyMissed TimeoutEventHandler
리턴 void

SendMessage() 공개 메소드

public SendMessage ( string msg_type, object message, EncryptionType encryption = EncryptionType.kDefaultEncryption, TransportProtocol protocol = TransportProtocol.kDefault, string expected_reply_type = null, float expected_reply_time = 0f, TimeoutEventHandler onReplyMissed = null ) : void
msg_type string
message object
encryption EncryptionType
protocol TransportProtocol
expected_reply_type string
expected_reply_time float
onReplyMissed TimeoutEventHandler
리턴 void

SendMessage() 공개 메소드

public SendMessage ( string msg_type, object message, string expected_reply_type, float expected_reply_time, TimeoutEventHandler onReplyMissed ) : void
msg_type string
message object
expected_reply_type string
expected_reply_time float
onReplyMissed TimeoutEventHandler
리턴 void

SetDefaultProtocol() 공개 메소드

public SetDefaultProtocol ( TransportProtocol protocol ) : void
protocol TransportProtocol
리턴 void

SetMessageProtocol() 공개 메소드

public SetMessageProtocol ( TransportProtocol protocol, string msg_type ) : void
protocol TransportProtocol
msg_type string
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

StartTransport() 공개 메소드

public StartTransport ( TransportProtocol protocol ) : void
protocol TransportProtocol
리턴 void

Stop() 공개 메소드

public Stop ( bool clear_all = true ) : void
clear_all bool
리턴 void

StopTransport() 공개 메소드

public StopTransport ( TransportProtocol protocol ) : void
protocol TransportProtocol
리턴 void

Update() 공개 메소드

public Update ( ) : void
리턴 void