C# Class Client, KerbalLiveFeed

Datei anzeigen Open project: SodiumEyes/KerbalLiveFeed Class Usage Examples

Public Properties

Property Type Description
clientID int
encoder UnicodeEncoding
endSession bool
handshakeCompleted bool
inactiveShipsPerUpdate byte
intentionalConnectionEnd bool
lastTCPMessageSendTime long
lastUDPAckReceiveTime long
lastUDPMessageSendTime long
quitHelperMessageShow bool
screenshotInterval int
screenshotSettings ScreenshotSettings
tcpClient TcpClient
udpConnected bool
udpSocket Socket
updateInterval int

Protected Properties

Property Type Description
cachedScreenshots List
clientDataLock object
currentGameTitle String
currentMessageData byte[]
currentMessageDataIndex int
currentMessageHeader byte[]
currentMessageHeaderIndex int
currentMessageID KLFCommon.ServerMessageID
lastClientDataChangeTime long
lastClientDataWriteTime long
lastScreenshotShareTime long
pingStopwatch Stopwatch
queuedOutScreenshot byte[]
receiveBuffer byte[]
receiveHandleIndex int
receiveIndex int
screenshotOutLock object
serverSettingsLock object
stopwatch Stopwatch
tcpSendLock object
threadExceptionLock object
udpTimestampLock object
watchPlayerIndex int
watchPlayerName String

Public Methods

Method Description
Client ( ) : System
connectToServer ( ClientSettings settings ) : bool
endConnection ( ) : void
throttledShareScreenshots ( ) : void

Protected Methods

Method Description
asyncReceive ( IAsyncResult result ) : void
beginAsyncRead ( ) : void
buildMessageByteArray ( KLFCommon id, byte data, byte prefix = null ) : byte[]
cacheScreenshot ( Screenshot screenshot ) : void
clearConnectionState ( ) : void
connectionEnded ( ) : void
connectionStarted ( ) : void
encodeInteropMessage ( int id, byte data ) : byte[]
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 ) : void
findCraftFilename ( String craft_name, byte &craft_type ) : String
getCachedScreenshot ( int index, string player ) : Screenshot
getCraftFilename ( String craft_name, byte craft_type ) : String
handleChatInput ( String line ) : void
handleConnection ( ) : void
handleInteropMessage ( KLFCommon id, byte data ) : void
handleInteropMessage ( int id, byte data ) : void
handleMessage ( KLFCommon id, byte data ) : void
handleReceive ( ) : void
messageReceived ( KLFCommon id, byte data ) : void
safeDelete ( String filename ) : void
sendClientInteropMessage ( KLFCommon id, byte data ) : void
sendConnectionEndMessage ( String message ) : void
sendHandshakeMessage ( ) : void
sendMessageTCP ( KLFCommon id, byte data ) : void
sendMessageUDP ( KLFCommon id, byte data ) : void
sendPluginUpdate ( byte data, bool primary ) : void
sendScreenshotWatchPlayerMessage ( bool send_screenshot, int current_index, int index, String name ) : void
sendShareCraftMessage ( String craft_name, byte data, byte type ) : void
sendShareScreenshotMesssage ( byte data ) : void
sendTextMessage ( String message ) : void
sendUDPProbeMessage ( ) : void
writeClientData ( ) : void

Method Details

Client() public method

public Client ( ) : System
return System

asyncReceive() protected method

protected asyncReceive ( IAsyncResult result ) : void
result IAsyncResult
return void

beginAsyncRead() protected method

protected beginAsyncRead ( ) : void
return void

buildMessageByteArray() protected method

protected buildMessageByteArray ( KLFCommon id, byte data, byte prefix = null ) : byte[]
id KLFCommon
data byte
prefix byte
return byte[]

cacheScreenshot() protected method

protected cacheScreenshot ( Screenshot screenshot ) : void
screenshot Screenshot
return void

clearConnectionState() protected method

protected clearConnectionState ( ) : void
return void

connectToServer() public method

public connectToServer ( ClientSettings settings ) : bool
settings ClientSettings
return bool

connectionEnded() protected method

protected connectionEnded ( ) : void
return void

connectionStarted() protected method

protected connectionStarted ( ) : void
return void

encodeInteropMessage() protected method

protected encodeInteropMessage ( int id, byte data ) : byte[]
id int
data byte
return byte[]

endConnection() public method

public endConnection ( ) : void
return void

enqueuePluginChatMessage() protected method

protected enqueuePluginChatMessage ( String message, bool print = false ) : void
message String
print bool
return void

enqueueTextMessage() protected method

protected enqueueTextMessage ( InTextMessage message, bool to_plugin = true ) : void
message InTextMessage
to_plugin bool
return void

enqueueTextMessage() protected method

protected enqueueTextMessage ( String message, bool from_server = false, bool to_plugin = true ) : void
message String
from_server bool
to_plugin bool
return void

findCraftFilename() protected method

protected findCraftFilename ( String craft_name, byte &craft_type ) : String
craft_name String
craft_type byte
return String

getCachedScreenshot() protected method

protected getCachedScreenshot ( int index, string player ) : Screenshot
index int
player string
return Screenshot

getCraftFilename() protected method

protected getCraftFilename ( String craft_name, byte craft_type ) : String
craft_name String
craft_type byte
return String

handleChatInput() protected method

protected handleChatInput ( String line ) : void
line String
return void

handleConnection() protected method

protected handleConnection ( ) : void
return void

handleInteropMessage() protected method

protected handleInteropMessage ( KLFCommon id, byte data ) : void
id KLFCommon
data byte
return void

handleInteropMessage() protected method

protected handleInteropMessage ( int id, byte data ) : void
id int
data byte
return void

handleMessage() protected method

protected handleMessage ( KLFCommon id, byte data ) : void
id KLFCommon
data byte
return void

handleReceive() protected method

protected handleReceive ( ) : void
return void

messageReceived() protected abstract method

protected abstract messageReceived ( KLFCommon id, byte data ) : void
id KLFCommon
data byte
return void

safeDelete() protected method

protected safeDelete ( String filename ) : void
filename String
return void

sendClientInteropMessage() protected abstract method

protected abstract sendClientInteropMessage ( KLFCommon id, byte data ) : void
id KLFCommon
data byte
return void

sendConnectionEndMessage() protected method

protected sendConnectionEndMessage ( String message ) : void
message String
return void

sendHandshakeMessage() protected method

protected sendHandshakeMessage ( ) : void
return void

sendMessageTCP() protected method

protected sendMessageTCP ( KLFCommon id, byte data ) : void
id KLFCommon
data byte
return void

sendMessageUDP() protected method

protected sendMessageUDP ( KLFCommon id, byte data ) : void
id KLFCommon
data byte
return void

sendPluginUpdate() protected method

protected sendPluginUpdate ( byte data, bool primary ) : void
data byte
primary bool
return void

sendScreenshotWatchPlayerMessage() protected method

protected sendScreenshotWatchPlayerMessage ( bool send_screenshot, int current_index, int index, String name ) : void
send_screenshot bool
current_index int
index int
name String
return void

sendShareCraftMessage() protected method

protected sendShareCraftMessage ( String craft_name, byte data, byte type ) : void
craft_name String
data byte
type byte
return void

sendShareScreenshotMesssage() protected method

protected sendShareScreenshotMesssage ( byte data ) : void
data byte
return void

sendTextMessage() protected method

protected sendTextMessage ( String message ) : void
message String
return void

sendUDPProbeMessage() protected method

protected sendUDPProbeMessage ( ) : void
return void

throttledShareScreenshots() public method

public throttledShareScreenshots ( ) : void
return void

writeClientData() protected method

protected writeClientData ( ) : void
return void

Property Details

cachedScreenshots protected_oe property

protected List cachedScreenshots
return List

clientDataLock protected_oe property

protected object clientDataLock
return object

clientID public_oe property

public int clientID
return int

currentGameTitle protected_oe property

protected String currentGameTitle
return String

currentMessageData protected_oe property

protected byte[] currentMessageData
return byte[]

currentMessageDataIndex protected_oe property

protected int currentMessageDataIndex
return int

currentMessageHeader protected_oe property

protected byte[] currentMessageHeader
return byte[]

currentMessageHeaderIndex protected_oe property

protected int currentMessageHeaderIndex
return int

currentMessageID protected_oe property

protected KLFCommon.ServerMessageID currentMessageID
return KLFCommon.ServerMessageID

encoder public_oe static_oe property

public static UnicodeEncoding encoder
return UnicodeEncoding

endSession public_oe property

public bool endSession
return bool

handshakeCompleted public_oe property

public bool handshakeCompleted
return bool

inactiveShipsPerUpdate public_oe property

public byte inactiveShipsPerUpdate
return byte

intentionalConnectionEnd public_oe property

public bool intentionalConnectionEnd
return bool

lastClientDataChangeTime protected_oe property

protected long lastClientDataChangeTime
return long

lastClientDataWriteTime protected_oe property

protected long lastClientDataWriteTime
return long

lastScreenshotShareTime protected_oe property

protected long lastScreenshotShareTime
return long

lastTCPMessageSendTime public_oe property

public long lastTCPMessageSendTime
return long

lastUDPAckReceiveTime public_oe property

public long lastUDPAckReceiveTime
return long

lastUDPMessageSendTime public_oe property

public long lastUDPMessageSendTime
return long

pingStopwatch protected_oe property

protected Stopwatch pingStopwatch
return Stopwatch

queuedOutScreenshot protected_oe property

protected byte[] queuedOutScreenshot
return byte[]

quitHelperMessageShow public_oe property

public bool quitHelperMessageShow
return bool

receiveBuffer protected_oe property

protected byte[] receiveBuffer
return byte[]

receiveHandleIndex protected_oe property

protected int receiveHandleIndex
return int

receiveIndex protected_oe property

protected int receiveIndex
return int

screenshotInterval public_oe property

public int screenshotInterval
return int

screenshotOutLock protected_oe property

protected object screenshotOutLock
return object

screenshotSettings public_oe property

public ScreenshotSettings screenshotSettings
return ScreenshotSettings

serverSettingsLock protected_oe property

protected object serverSettingsLock
return object

stopwatch protected_oe property

protected Stopwatch stopwatch
return Stopwatch

tcpClient public_oe property

public TcpClient tcpClient
return TcpClient

tcpSendLock protected_oe property

protected object tcpSendLock
return object

threadExceptionLock protected_oe property

protected object threadExceptionLock
return object

udpConnected public_oe property

public bool udpConnected
return bool

udpSocket public_oe property

public Socket udpSocket
return Socket

udpTimestampLock protected_oe property

protected object udpTimestampLock
return object

updateInterval public_oe property

public int updateInterval
return int

watchPlayerIndex protected_oe property

protected int watchPlayerIndex
return int

watchPlayerName protected_oe property

protected String watchPlayerName
return String