C# Class KLFServer.Server

Afficher le fichier Open project: SodiumEyes/KerbalLiveFeed Class Usage Examples

Méthodes publiques

Свойство Type Description
bannedIPs HashSet
clientActivityCountLock object
clientMessageQueue ConcurrentQueue
clients ServerClient[]
commandThread Thread
connectionThread Thread
consoleWriteLock object
httpListener HttpListener
listenThread Thread
outgoingMessageThread Thread
quit bool
savedThrottleStates ServerClient.ThrottleState>.Dictionary
settings ServerSettings
stop bool
stopwatch Stopwatch
tcpListener TcpListener
threadException Exception
threadExceptionLock object
threadExceptionStackTrace String
udpClient UdpClient

Méthodes publiques

Méthode Description
Server ( ServerSettings settings ) : System
buildMessageArray ( KLFCommon id, byte data ) : byte[]
clearState ( ) : void
clientActivityLevelChanged ( int index ) : void
clientIsReady ( int index ) : bool
clientIsValid ( int index ) : bool
debugConsoleWriteLine ( String message ) : void
disconnectClient ( int index, String message ) : void
handleClientTextMessage ( int client_index, String message_text ) : void
handleMessage ( int client_index, KLFCommon id, byte data ) : void
hostingLoop ( ) : void
messageFloodIncrement ( int index ) : void
passExceptionToMain ( Exception e ) : void
queueClientMessage ( int client_index, KLFCommon id, byte data ) : void
saveScreenshot ( Screenshot screenshot, String player ) : void
sendOutgoingMessages ( ) : void
stampedConsoleWriteLine ( String message ) : void

Private Methods

Méthode Description
addClient ( TcpClient tcp_client ) : int
asyncHTTPCallback ( IAsyncResult result ) : void
asyncUDPReceive ( IAsyncResult result ) : void
banClient ( int index ) : void
banIP ( IPAddress address ) : void
clearBans ( ) : void
getClientIP ( int index ) : IPAddress
getClientIndexByName ( String name ) : int
handleCommands ( ) : void
handleConnections ( ) : void
listenForClients ( ) : void
loadBanList ( ) : void
printCommands ( ) : void
safeAbort ( Thread thread, bool join = false ) : void
saveBanList ( ) : void
sendConnectionEndMessageDirect ( TcpClient client, String message ) : void
sendCraftFile ( int client_index, String craft_name, byte data, byte type ) : void
sendHandshakeMessage ( int client_index ) : void
sendHandshakeRefusalMessageDirect ( TcpClient client, String message ) : void
sendMessageHeaderDirect ( TcpClient client, KLFCommon id, int msg_length ) : void
sendPluginUpdateToAll ( byte data, bool in_flight_only, int exclude_index = -1 ) : void
sendScreenshot ( int client_index, Screenshot screenshot ) : void
sendScreenshotToWatchers ( int client_index, Screenshot screenshot ) : void
sendServerMessage ( int client_index, String message ) : void
sendServerMessageToAll ( String message, int exclude_index = -1 ) : void
sendServerSettings ( int client_index ) : void
sendServerSettingsToAll ( ) : void
sendTextMessage ( int client_index, String message ) : void
sendTextMessageToAll ( String message, int exclude_index = -1 ) : void
serverSettingBytes ( ) : byte[]
unbanIP ( IPAddress address ) : void

Method Details

Server() public méthode

public Server ( ServerSettings settings ) : System
settings ServerSettings
Résultat System

buildMessageArray() public static méthode

public static buildMessageArray ( KLFCommon id, byte data ) : byte[]
id KLFCommon
data byte
Résultat byte[]

clearState() public méthode

public clearState ( ) : void
Résultat void

clientActivityLevelChanged() public méthode

public clientActivityLevelChanged ( int index ) : void
index int
Résultat void

clientIsReady() public méthode

public clientIsReady ( int index ) : bool
index int
Résultat bool

clientIsValid() public méthode

public clientIsValid ( int index ) : bool
index int
Résultat bool

debugConsoleWriteLine() public static méthode

public static debugConsoleWriteLine ( String message ) : void
message String
Résultat void

disconnectClient() public méthode

public disconnectClient ( int index, String message ) : void
index int
message String
Résultat void

handleClientTextMessage() public méthode

public handleClientTextMessage ( int client_index, String message_text ) : void
client_index int
message_text String
Résultat void

handleMessage() public méthode

public handleMessage ( int client_index, KLFCommon id, byte data ) : void
client_index int
id KLFCommon
data byte
Résultat void

hostingLoop() public méthode

public hostingLoop ( ) : void
Résultat void

messageFloodIncrement() public méthode

public messageFloodIncrement ( int index ) : void
index int
Résultat void

passExceptionToMain() public méthode

public passExceptionToMain ( Exception e ) : void
e Exception
Résultat void

queueClientMessage() public méthode

public queueClientMessage ( int client_index, KLFCommon id, byte data ) : void
client_index int
id KLFCommon
data byte
Résultat void

saveScreenshot() public méthode

public saveScreenshot ( Screenshot screenshot, String player ) : void
screenshot Screenshot
player String
Résultat void

sendOutgoingMessages() public méthode

public sendOutgoingMessages ( ) : void
Résultat void

stampedConsoleWriteLine() public static méthode

public static stampedConsoleWriteLine ( String message ) : void
message String
Résultat void

Property Details

bannedIPs public_oe property

public HashSet bannedIPs
Résultat HashSet

clientActivityCountLock public_oe property

public object clientActivityCountLock
Résultat object

clientMessageQueue public_oe property

public ConcurrentQueue clientMessageQueue
Résultat ConcurrentQueue

clients public_oe property

public ServerClient[] clients
Résultat ServerClient[]

commandThread public_oe property

public Thread commandThread
Résultat Thread

connectionThread public_oe property

public Thread connectionThread
Résultat Thread

consoleWriteLock public_oe static_oe property

public static object consoleWriteLock
Résultat object

httpListener public_oe property

public HttpListener httpListener
Résultat HttpListener

listenThread public_oe property

public Thread listenThread
Résultat Thread

outgoingMessageThread public_oe property

public Thread outgoingMessageThread
Résultat Thread

quit public_oe property

public bool quit
Résultat bool

savedThrottleStates public_oe property

public Dictionary savedThrottleStates
Résultat ServerClient.ThrottleState>.Dictionary

settings public_oe property

public ServerSettings settings
Résultat ServerSettings

stop public_oe property

public bool stop
Résultat bool

stopwatch public_oe property

public Stopwatch stopwatch
Résultat Stopwatch

tcpListener public_oe property

public TcpListener tcpListener
Résultat TcpListener

threadException public_oe property

public Exception threadException
Résultat Exception

threadExceptionLock public_oe property

public object threadExceptionLock
Résultat object

threadExceptionStackTrace public_oe property

public String threadExceptionStackTrace
Résultat String

udpClient public_oe property

public UdpClient udpClient
Résultat UdpClient