C# 클래스 fCraft.Session

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

공개 프로퍼티들

프로퍼티 타입 설명
CanReceive bool
FullPositionUpdateInterval int
LoginTime System.DateTime
Player Player
canReceive bool
loginTime System.DateTime
outputQueue Queue
player Player
state State

공개 메소드들

메소드 설명
AddEntity ( Player player, Position newPos ) : void
ClearBlockUpdateQueue ( ) : void
ClearPriorityOutputQueue ( ) : void
DenyMovement ( ) : void
Disconnect ( ) : void
GetIP ( ) : IPAddress
HideEntity ( VisibleEntity entity ) : void
IoLoop ( ) : void
JoinWorld ( World newWorld ) : void
JoinWorld ( World newWorld, Position position ) : void
JoinWorldInternal ( World newWorld, Position position, bool doUseWorldPosition ) : void
Kick ( string message ) : void
Kick ( string message, LeaveReason leaveReason ) : void

Kick (asynchronous). Immediately blocks all client input, but waits until client thread sends the kick packet.

KickNow ( string message ) : void
KickNow ( string message, LeaveReason leaveReason ) : void

Kick (synchronous). Immediately sends the kick packet. Can only be used from IoThread (this is not thread-safe).

LoginSequence ( ) : void
MeasureBandwidthUseRates ( ) : void
MoveEntity ( VisibleEntity entity, Position newPos ) : void
ProcessMovementPacket ( ) : void
ProcessSetBlockPacket ( ) : void
ReAddEntity ( VisibleEntity entity, Player player, Position newPos ) : void
RemoveEntity ( Player player ) : void
ResetVisibleEntities ( ) : void
Send ( Packet packet ) : void

Send packet (asynchronous, priority queue). This is used for most packets (movement, chat, etc).

Send ( Packet packet, bool isHighPriority ) : void
SendDelayed ( Packet packet ) : void

Send packet (asynchronous, delayed queue). This is currently only used for block updates.

SendNow ( Packet packet ) : void

Send packet to player (synchronous). Sends the packet off immediately. Should not be used from any thread other than this session's IoThread. Not thread-safe (for performance reason).

Session ( TcpClient tcpClient ) : System
Session ( World _world, TcpClient _client ) : System
ShowEntity ( VisibleEntity entity, Position newPos ) : void
Start ( ) : void
ToString ( ) : string
UpdateVisibleEntities ( ) : void
WaitForDisconnect ( ) : void

Blocks the calling thread until this session disconnects.

비공개 메소드들

메소드 설명
DetectMovementPacketSpam ( ) : bool
HandleInput ( Packet packet ) : void
InputHandler ( ) : void
JoinWorldNow ( World newWorld, bool firstTime, bool doUseWorldSpawn ) : bool
LoginFailure ( string message ) : void
LoginSequence ( ) : bool
LoginSuccess ( ) : void
OutputHandler ( ) : void
ProcessMessagePacket ( ) : bool
ReadString ( ) : string

메소드 상세

AddEntity() 공개 메소드

public AddEntity ( Player player, Position newPos ) : void
player Player
newPos Position
리턴 void

ClearBlockUpdateQueue() 공개 메소드

public ClearBlockUpdateQueue ( ) : void
리턴 void

ClearPriorityOutputQueue() 공개 메소드

public ClearPriorityOutputQueue ( ) : void
리턴 void

DenyMovement() 공개 메소드

public DenyMovement ( ) : void
리턴 void

Disconnect() 공개 메소드

public Disconnect ( ) : void
리턴 void

GetIP() 공개 메소드

public GetIP ( ) : IPAddress
리턴 System.Net.IPAddress

HideEntity() 공개 메소드

public HideEntity ( VisibleEntity entity ) : void
entity VisibleEntity
리턴 void

IoLoop() 공개 메소드

public IoLoop ( ) : void
리턴 void

JoinWorld() 공개 메소드

public JoinWorld ( World newWorld ) : void
newWorld World
리턴 void

JoinWorld() 공개 메소드

public JoinWorld ( World newWorld, Position position ) : void
newWorld World
position Position
리턴 void

JoinWorldInternal() 공개 메소드

public JoinWorldInternal ( World newWorld, Position position, bool doUseWorldPosition ) : void
newWorld World
position Position
doUseWorldPosition bool
리턴 void

Kick() 공개 메소드

public Kick ( string message ) : void
message string
리턴 void

Kick() 공개 메소드

Kick (asynchronous). Immediately blocks all client input, but waits until client thread sends the kick packet.
public Kick ( string message, LeaveReason leaveReason ) : void
message string
leaveReason LeaveReason
리턴 void

KickNow() 공개 메소드

public KickNow ( string message ) : void
message string
리턴 void

KickNow() 공개 메소드

Kick (synchronous). Immediately sends the kick packet. Can only be used from IoThread (this is not thread-safe).
public KickNow ( string message, LeaveReason leaveReason ) : void
message string
leaveReason LeaveReason
리턴 void

LoginSequence() 공개 메소드

public LoginSequence ( ) : void
리턴 void

MeasureBandwidthUseRates() 공개 메소드

public MeasureBandwidthUseRates ( ) : void
리턴 void

MoveEntity() 공개 메소드

public MoveEntity ( VisibleEntity entity, Position newPos ) : void
entity VisibleEntity
newPos Position
리턴 void

ProcessMovementPacket() 공개 메소드

public ProcessMovementPacket ( ) : void
리턴 void

ProcessSetBlockPacket() 공개 메소드

public ProcessSetBlockPacket ( ) : void
리턴 void

ReAddEntity() 공개 메소드

public ReAddEntity ( VisibleEntity entity, Player player, Position newPos ) : void
entity VisibleEntity
player Player
newPos Position
리턴 void

RemoveEntity() 공개 메소드

public RemoveEntity ( Player player ) : void
player Player
리턴 void

ResetVisibleEntities() 공개 메소드

public ResetVisibleEntities ( ) : void
리턴 void

Send() 공개 메소드

Send packet (asynchronous, priority queue). This is used for most packets (movement, chat, etc).
public Send ( Packet packet ) : void
packet Packet
리턴 void

Send() 공개 메소드

public Send ( Packet packet, bool isHighPriority ) : void
packet Packet
isHighPriority bool
리턴 void

SendDelayed() 공개 메소드

Send packet (asynchronous, delayed queue). This is currently only used for block updates.
public SendDelayed ( Packet packet ) : void
packet Packet
리턴 void

SendNow() 공개 메소드

Send packet to player (synchronous). Sends the packet off immediately. Should not be used from any thread other than this session's IoThread. Not thread-safe (for performance reason).
public SendNow ( Packet packet ) : void
packet Packet
리턴 void

Session() 공개 메소드

public Session ( TcpClient tcpClient ) : System
tcpClient System.Net.Sockets.TcpClient
리턴 System

Session() 공개 메소드

public Session ( World _world, TcpClient _client ) : System
_world World
_client System.Net.Sockets.TcpClient
리턴 System

ShowEntity() 공개 메소드

public ShowEntity ( VisibleEntity entity, Position newPos ) : void
entity VisibleEntity
newPos Position
리턴 void

Start() 공개 메소드

public Start ( ) : void
리턴 void

ToString() 공개 메소드

public ToString ( ) : string
리턴 string

UpdateVisibleEntities() 공개 메소드

public UpdateVisibleEntities ( ) : void
리턴 void

WaitForDisconnect() 공개 메소드

Blocks the calling thread until this session disconnects.
public WaitForDisconnect ( ) : void
리턴 void

프로퍼티 상세

CanReceive 공개적으로 프로퍼티

public bool CanReceive
리턴 bool

FullPositionUpdateInterval 공개적으로 정적으로 프로퍼티

public static int FullPositionUpdateInterval
리턴 int

LoginTime 공개적으로 프로퍼티

public DateTime,System LoginTime
리턴 System.DateTime

Player 공개적으로 프로퍼티

public Player Player
리턴 Player

canReceive 공개적으로 프로퍼티

public bool canReceive
리턴 bool

loginTime 공개적으로 프로퍼티

public DateTime,System loginTime
리턴 System.DateTime

outputQueue 공개적으로 프로퍼티

public Queue outputQueue
리턴 Queue

player 공개적으로 프로퍼티

public Player player
리턴 Player

state 공개적으로 프로퍼티

public State state
리턴 State