C# Class KMP.KMPClientMain

Afficher le fichier Open project: TehGimp/KerbalMultiPlayer

Méthodes publiques

Свойство Type Description
GAMEDATAPATH string
autoReconnect bool
chatThread Thread
clientDataLock object
clientID int
connectionThread Thread
currentBytesToReceive int
currentGameTitle String
currentMessage byte[]
currentMessageHeaderRecieved bool
currentMessageID KMPCommon.ServerMessageID
debugging bool
encoder UnicodeEncoding
endSession bool
favorites String[]>.Dictionary
gameManager KMPManager
handlingMessageType KMPCommon.ServerMessageID
handshakeCompleted bool
hostname String
inactiveShipsPerUpdate byte
intentionalConnectionEnd bool
interopInQueue Queue
interopOutQueueLock object
interopThread Thread
kmpModControl_bytes byte[]
lastClientDataChangeTime long
lastClientDataWriteTime long
lastKeepAliveSendTime long
lastScreenshotShareTime long
lastSharedScreenshot byte[]
lastTCPMessageSendTime long
lastUDPAckReceiveTime long
lastUDPMessageSendTime long
lastUDPProbeTime long
message String
modFileChecked bool
modFileList SHAMod>.Dictionary
modMismatchError string
partList List
pluginUpdateInQueue Queue
queuedOutScreenshot byte[]
quitHelperMessageShow bool
receivedMessageQueue Queue
receivedSettings bool
reconnectAttempts int
requiredModList List
resourceControlMode string
resourceList List
screenshotInterval int
screenshotOutLock object
screenshotSettings ScreenshotSettings
screenshotsWaiting List
sendOutgoingMessagesLock object
sendOutgoingUDPMessagesLock object
serverSettingsLock object
serverThread Thread
stopwatch Stopwatch
tcpClient TcpClient
textMessageQueue Queue
threadException Exception
threadExceptionLock object
threadExceptionStackTrace String
udpClient UdpClient
udpConnected bool
udpTimestampLock object
updateInterval int
watchPlayerName String

Méthodes publiques

Méthode Description
Connect ( ) : void
GetFavorites ( ) : String[]>.Dictionary
GetUsername ( ) : String
InitMPClient ( KMPManager manager ) : void
SetAutoReconnect ( bool newAutoReconnect ) : void
SetFavorites ( String[]>.Dictionary newFavorites ) : void
SetMessage ( String newMessage ) : void
SetServer ( String newHostname ) : void
SetUsername ( String newUsername ) : void
acceptPluginInterop ( byte bytes ) : void
clearConnectionState ( ) : void
handleSplitMessage ( byte data ) : void
readConfigFile ( ) : void

Private Methods

Méthode Description
FileCheck ( ) : bool
ReceiveCallback ( IAsyncResult ar ) : void
asyncTCPSend ( IAsyncResult result ) : void
asyncUDPSend ( IAsyncResult result ) : void
beginAsyncRead ( ) : void
beginConnect ( ) : void
buildMessageByteArray ( KMPCommon id, byte data, byte prefix = null ) : byte[]
buildNewXML ( ) : string
connectionLoop ( ) : bool

Connect to the server and run a session until the connection ends

enqueueClientInteropMessage ( KMPCommon id, byte data ) : void
enqueuePluginChatMessage ( String message, bool print = false ) : void
enqueueTextMessage ( InTextMessage message, bool to_plugin = true ) : void
enqueueTextMessage ( String message, bool from_server = false, bool to_plugin = true, bool isMOTD = false ) : void
findCraftFilename ( String craft_name, KMPCommon &craft_type ) : String
getCraftFilename ( String craft_name, KMPCommon craft_type ) : String
getKMPDirectory ( ) : String
handleChat ( ) : void
handleChatInput ( String line ) : void
handleConnection ( ) : void
handleInteropMessage ( KMPCommon id, byte data ) : void
handleMessage ( KMPCommon id, byte data ) : void
handlePluginInterop ( ) : void
handlePluginUpdates ( ) : void
messageReceived ( KMPCommon id, byte data ) : void
modCheck ( byte kmpModControl_bytes ) : bool
parseModFile ( string ModFileContent ) : void
passExceptionToMain ( Exception e ) : void
processPluginInterop ( ) : void
queueOutgoingMessage ( KMPCommon id, byte data ) : void
queueOutgoingUDPMessage ( KMPCommon id, byte data ) : void
readTokenFile ( ) : void
resourceCheck ( ) : bool
safeAbort ( Thread thread, bool join = false ) : void
safeDelete ( String filename ) : void
sendConnectionEndMessage ( String message ) : void
sendHandshakeMessage ( ) : void
sendOutgoingMessages ( ) : void
sendOutgoingUDPMessages ( ) : void
sendPluginUpdate ( byte data, bool primary ) : void
sendScenarioUpdate ( byte data ) : void
sendScreenshotWatchPlayerMessage ( String name ) : void
sendShareCraftMessage ( String craft_name, byte data, KMPCommon type ) : void
sendShareScreenshotMessage ( byte data ) : void
sendTextMessage ( String message ) : void
sendUDPProbeMessage ( bool forceUDP ) : void
splitOutgoingMessage ( byte &next_message ) : void
startSaveExists ( ) : bool
syncTimeRewrite ( byte &next_message ) : void
verifyShipsDirectory ( ) : void
writeClientData ( ) : void
writeConfigFile ( ) : void

Method Details

Connect() public static méthode

public static Connect ( ) : void
Résultat void

GetFavorites() public static méthode

public static GetFavorites ( ) : String[]>.Dictionary
Résultat String[]>.Dictionary

GetUsername() public static méthode

public static GetUsername ( ) : String
Résultat String

InitMPClient() public static méthode

public static InitMPClient ( KMPManager manager ) : void
manager KMPManager
Résultat void

SetAutoReconnect() public static méthode

public static SetAutoReconnect ( bool newAutoReconnect ) : void
newAutoReconnect bool
Résultat void

SetFavorites() public static méthode

public static SetFavorites ( String[]>.Dictionary newFavorites ) : void
newFavorites String[]>.Dictionary
Résultat void

SetMessage() public static méthode

public static SetMessage ( String newMessage ) : void
newMessage String
Résultat void

SetServer() public static méthode

public static SetServer ( String newHostname ) : void
newHostname String
Résultat void

SetUsername() public static méthode

public static SetUsername ( String newUsername ) : void
newUsername String
Résultat void

acceptPluginInterop() public static méthode

public static acceptPluginInterop ( byte bytes ) : void
bytes byte
Résultat void

clearConnectionState() public static méthode

public static clearConnectionState ( ) : void
Résultat void

handleSplitMessage() public static méthode

public static handleSplitMessage ( byte data ) : void
data byte
Résultat void

readConfigFile() public static méthode

public static readConfigFile ( ) : void
Résultat void

Property Details

GAMEDATAPATH public_oe static_oe property

public static string GAMEDATAPATH
Résultat string

autoReconnect public_oe static_oe property

public static bool autoReconnect
Résultat bool

chatThread public_oe static_oe property

public static Thread chatThread
Résultat Thread

clientDataLock public_oe static_oe property

public static object clientDataLock
Résultat object

clientID public_oe static_oe property

public static int clientID
Résultat int

connectionThread public_oe static_oe property

public static Thread connectionThread
Résultat Thread

currentBytesToReceive public_oe static_oe property

public static int currentBytesToReceive
Résultat int

currentGameTitle public_oe static_oe property

public static String currentGameTitle
Résultat String

currentMessage public_oe static_oe property

public static byte[] currentMessage
Résultat byte[]

currentMessageHeaderRecieved public_oe static_oe property

public static bool currentMessageHeaderRecieved
Résultat bool

currentMessageID public_oe static_oe property

public static KMPCommon.ServerMessageID currentMessageID
Résultat KMPCommon.ServerMessageID

debugging public_oe static_oe property

public static bool debugging
Résultat bool

encoder public_oe static_oe property

public static UnicodeEncoding encoder
Résultat UnicodeEncoding

endSession public_oe static_oe property

public static bool endSession
Résultat bool

favorites public_oe static_oe property

public static Dictionary favorites
Résultat String[]>.Dictionary

gameManager public_oe static_oe property

public static KMPManager gameManager
Résultat KMPManager

handlingMessageType public_oe static_oe property

public static KMPCommon.ServerMessageID handlingMessageType
Résultat KMPCommon.ServerMessageID

handshakeCompleted public_oe static_oe property

public static bool handshakeCompleted
Résultat bool

hostname public_oe static_oe property

public static String hostname
Résultat String

inactiveShipsPerUpdate public_oe static_oe property

public static byte inactiveShipsPerUpdate
Résultat byte

intentionalConnectionEnd public_oe static_oe property

public static bool intentionalConnectionEnd
Résultat bool

interopInQueue public_oe static_oe property

public static Queue interopInQueue
Résultat Queue

interopOutQueueLock public_oe static_oe property

public static object interopOutQueueLock
Résultat object

interopThread public_oe static_oe property

public static Thread interopThread
Résultat Thread

kmpModControl_bytes public_oe static_oe property

public static byte[] kmpModControl_bytes
Résultat byte[]

lastClientDataChangeTime public_oe static_oe property

public static long lastClientDataChangeTime
Résultat long

lastClientDataWriteTime public_oe static_oe property

public static long lastClientDataWriteTime
Résultat long

lastKeepAliveSendTime public_oe static_oe property

public static long lastKeepAliveSendTime
Résultat long

lastScreenshotShareTime public_oe static_oe property

public static long lastScreenshotShareTime
Résultat long

lastSharedScreenshot public_oe static_oe property

public static byte[] lastSharedScreenshot
Résultat byte[]

lastTCPMessageSendTime public_oe static_oe property

public static long lastTCPMessageSendTime
Résultat long

lastUDPAckReceiveTime public_oe static_oe property

public static long lastUDPAckReceiveTime
Résultat long

lastUDPMessageSendTime public_oe static_oe property

public static long lastUDPMessageSendTime
Résultat long

lastUDPProbeTime public_oe static_oe property

public static long lastUDPProbeTime
Résultat long

message public_oe static_oe property

public static String message
Résultat String

modFileChecked public_oe static_oe property

public static bool modFileChecked
Résultat bool

modFileList public_oe static_oe property

public static Dictionary modFileList
Résultat SHAMod>.Dictionary

modMismatchError public_oe static_oe property

public static string modMismatchError
Résultat string

partList public_oe static_oe property

public static List partList
Résultat List

pluginUpdateInQueue public_oe static_oe property

public static Queue pluginUpdateInQueue
Résultat Queue

queuedOutScreenshot public_oe static_oe property

public static byte[] queuedOutScreenshot
Résultat byte[]

quitHelperMessageShow public_oe static_oe property

public static bool quitHelperMessageShow
Résultat bool

receivedMessageQueue public_oe static_oe property

public static Queue receivedMessageQueue
Résultat Queue

receivedSettings public_oe static_oe property

public static bool receivedSettings
Résultat bool

reconnectAttempts public_oe static_oe property

public static int reconnectAttempts
Résultat int

requiredModList public_oe static_oe property

public static List requiredModList
Résultat List

resourceControlMode public_oe static_oe property

public static string resourceControlMode
Résultat string

resourceList public_oe static_oe property

public static List resourceList
Résultat List

screenshotInterval public_oe static_oe property

public static int screenshotInterval
Résultat int

screenshotOutLock public_oe static_oe property

public static object screenshotOutLock
Résultat object

screenshotSettings public_oe static_oe property

public static ScreenshotSettings screenshotSettings
Résultat ScreenshotSettings

screenshotsWaiting public_oe static_oe property

public static List screenshotsWaiting
Résultat List

sendOutgoingMessagesLock public_oe static_oe property

public static object sendOutgoingMessagesLock
Résultat object

sendOutgoingUDPMessagesLock public_oe static_oe property

public static object sendOutgoingUDPMessagesLock
Résultat object

serverSettingsLock public_oe static_oe property

public static object serverSettingsLock
Résultat object

serverThread public_oe static_oe property

public static Thread serverThread
Résultat Thread

stopwatch public_oe static_oe property

public static Stopwatch stopwatch
Résultat Stopwatch

tcpClient public_oe static_oe property

public static TcpClient tcpClient
Résultat TcpClient

textMessageQueue public_oe static_oe property

public static Queue textMessageQueue
Résultat Queue

threadException public_oe static_oe property

public static Exception threadException
Résultat Exception

threadExceptionLock public_oe static_oe property

public static object threadExceptionLock
Résultat object

threadExceptionStackTrace public_oe static_oe property

public static String threadExceptionStackTrace
Résultat String

udpClient public_oe static_oe property

public static UdpClient udpClient
Résultat UdpClient

udpConnected public_oe static_oe property

public static bool udpConnected
Résultat bool

udpTimestampLock public_oe static_oe property

public static object udpTimestampLock
Résultat object

updateInterval public_oe static_oe property

public static int updateInterval
Résultat int

watchPlayerName public_oe static_oe property

public static String watchPlayerName
Résultat String