C# Class ArtemisComm.PacketProcessing

Inheritance: IDisposable
Exibir arquivo Open project: russjudge/ArtemisSBS-ProtocolSharp Class Usage Examples

Private Properties

Property Type Description
Dispose void
Enqueue void
EnqueuePacket void
EnqueueReceivedPacket void
EnqueueSpecificPacket void
Initialize void
ListenForConnections void
PacketProcessing ArtemisComm.ShipAction2SubPackets
QueueToPacketProcessor void
RaiseExceptionEncountered void
RaisePackageReceived void
RaiseSpecificPacketEvents void
StartServerConnection void
Subscribe void
Unsubscribe void
conn_BytesReceived void
conn_Connected void
conn_ConnectionLost void
conn_ExceptionEncountered void

Public Methods

Method Description
Dispose ( ) : void
Send ( System.Guid connectionID, Packet packet ) : void
Send ( Packet packet ) : void
SendAudioCommandPacket ( System.Guid connectionID, int id, int playOrDismiss ) : void
SendCaptainSelectSubPacket ( System.Guid connectionID, int targetID ) : void
SendCommsOutgoingPacket ( System.Guid connectionID, int recipientType, int recipientID, int messageID, int targetObjectID, int unknown ) : void
SendConvertTorpedoSubPacket ( System.Guid connectionID, TorpedoEnergyConversionTypes direction ) : void
SendDiveRiseSubPacket ( System.Guid connectionID, int delta ) : void
SendEngSendDamconSubPacket ( System.Guid connectionID, int teamNumber, int x, int y, int z ) : void
SendEngSetAutoDamconSubPacket ( System.Guid connectionID, bool damComIsAutonomous ) : void
SendEngSetCoolantSubPacket ( System.Guid connectionID, ShipSystem system, int value ) : void
SendEngSetEnergySubPacket ( System.Guid connectionID, ShipSystem system, float value ) : void
SendFireTubeSubPacket ( System.Guid connectionID, int tubeIndex ) : void
SendGameMasterMessagePacket ( ) : void
SendHelmJumpSubPacket ( System.Guid connectionID, float bearing, float distance ) : void
SendHelmRequestDockSubPacket ( System.Guid connectionID ) : void
SendHelmSetImpulseSubPacket ( System.Guid connectionID, float velocity ) : void
SendHelmSetSteeringSubPacket ( System.Guid connectionID, float turnValue ) : void
SendHelmSetWarpSubPacket ( System.Guid connectionID, int warpFactor ) : void
SendHelmToggleReverseSubPacket ( System.Guid connectionID ) : void
SendLoadTubeSubPacket ( System.Guid connectionID, int tubeIndex, OrdinanceType ordinance ) : void
SendReady2SubPacket ( System.Guid connectionID ) : void
SendReadySubPacket ( System.Guid connectionID ) : void
SendSciScanSubPacket ( System.Guid connectionID, int targetID ) : void
SendSciSelectSubPacket ( System.Guid connectionID, int targetID ) : void
SendSetBeamFreqSubPacket ( System.Guid connectionID, BeamFrequencyTypes frequencyIndex ) : void
SendSetMainScreenSubPacket ( System.Guid connectionID, MainScreenViewTypes value ) : void
SendSetShipSettingsSubPacket ( System.Guid connectionID, DriveType drive, int shipType, int unknown, string shipName ) : void
SendSetShipSubPacket ( System.Guid connectionID, int selectedShip ) : void

Sends the set ship sub packet.

SendSetShipSubPacket ( int selectedShip ) : void
SendSetStationSubPacket ( System.Guid connectionID, StationType station, bool isSelected ) : void
SendSetWeaponsTargetSubPacket ( System.Guid connectionID, int tubeIndex ) : void
SendToggleAutoBeamsSubPacket ( System.Guid connectionID ) : void
SendTogglePerspectiveSubPacket ( System.Guid connectionID ) : void
SendToggleRedAlert ( System.Guid connectionID ) : void
SendToggleShields ( System.Guid connectionID ) : void
SendUnloadTubeSubPacket ( System.Guid connectionID, int tubeIndex ) : void
SetPort ( int port ) : void
SetServerHost ( string host ) : void
StartClientConnection ( TcpClient client ) : void
StartClientListener ( ) : void

Protected Methods

Method Description
OnEvent ( EventHandler handler, ConnectionEventArgs e ) : void
OnEvent ( EventHandler handler, ExceptionEventArgs e ) : void
OnEvent ( EventHandler handler, PackageEventArgs e ) : void

Private Methods

Method Description
Dispose ( bool Disposing ) : void
Enqueue ( Stream stream, System.Guid ID ) : void
EnqueuePacket ( Queue que, PackageEventArgs pea, ManualResetEvent mre ) : void
EnqueueReceivedPacket ( PackageEventArgs pea ) : void
EnqueueSpecificPacket ( PackageEventArgs pea ) : void
Initialize ( ) : void
ListenForConnections ( ) : void
PacketProcessing ( ) : ArtemisComm.ShipAction2SubPackets
QueueToPacketProcessor ( ) : void
RaiseExceptionEncountered ( Exception e, System.Guid id ) : void
RaisePackageReceived ( ) : void
RaiseSpecificPacketEvents ( ) : void
StartServerConnection ( ) : void
Subscribe ( Connector conn ) : void
Unsubscribe ( Connector conn ) : void
conn_BytesReceived ( object sender, BytesReceivedEventArgs e ) : void
conn_Connected ( object sender, ConnectionEventArgs e ) : void
conn_ConnectionLost ( object sender, ConnectionEventArgs e ) : void
conn_ExceptionEncountered ( object sender, ExceptionEventArgs e ) : void

Method Details

Dispose() public method

public Dispose ( ) : void
return void

OnEvent() protected method

protected OnEvent ( EventHandler handler, ConnectionEventArgs e ) : void
handler EventHandler
e ConnectionEventArgs
return void

OnEvent() protected method

protected OnEvent ( EventHandler handler, ExceptionEventArgs e ) : void
handler EventHandler
e ExceptionEventArgs
return void

OnEvent() protected method

protected OnEvent ( EventHandler handler, PackageEventArgs e ) : void
handler EventHandler
e PackageEventArgs
return void

Send() public method

public Send ( System.Guid connectionID, Packet packet ) : void
connectionID System.Guid
packet Packet
return void

Send() public method

public Send ( Packet packet ) : void
packet Packet
return void

SendAudioCommandPacket() public method

public SendAudioCommandPacket ( System.Guid connectionID, int id, int playOrDismiss ) : void
connectionID System.Guid
id int
playOrDismiss int
return void

SendCaptainSelectSubPacket() public method

public SendCaptainSelectSubPacket ( System.Guid connectionID, int targetID ) : void
connectionID System.Guid
targetID int
return void

SendCommsOutgoingPacket() public method

public SendCommsOutgoingPacket ( System.Guid connectionID, int recipientType, int recipientID, int messageID, int targetObjectID, int unknown ) : void
connectionID System.Guid
recipientType int
recipientID int
messageID int
targetObjectID int
unknown int
return void

SendConvertTorpedoSubPacket() public method

public SendConvertTorpedoSubPacket ( System.Guid connectionID, TorpedoEnergyConversionTypes direction ) : void
connectionID System.Guid
direction TorpedoEnergyConversionTypes
return void

SendDiveRiseSubPacket() public method

public SendDiveRiseSubPacket ( System.Guid connectionID, int delta ) : void
connectionID System.Guid
delta int
return void

SendEngSendDamconSubPacket() public method

public SendEngSendDamconSubPacket ( System.Guid connectionID, int teamNumber, int x, int y, int z ) : void
connectionID System.Guid
teamNumber int
x int
y int
z int
return void

SendEngSetAutoDamconSubPacket() public method

public SendEngSetAutoDamconSubPacket ( System.Guid connectionID, bool damComIsAutonomous ) : void
connectionID System.Guid
damComIsAutonomous bool
return void

SendEngSetCoolantSubPacket() public method

public SendEngSetCoolantSubPacket ( System.Guid connectionID, ShipSystem system, int value ) : void
connectionID System.Guid
system ShipSystem
value int
return void

SendEngSetEnergySubPacket() public method

public SendEngSetEnergySubPacket ( System.Guid connectionID, ShipSystem system, float value ) : void
connectionID System.Guid
system ShipSystem
value float
return void

SendFireTubeSubPacket() public method

public SendFireTubeSubPacket ( System.Guid connectionID, int tubeIndex ) : void
connectionID System.Guid
tubeIndex int
return void

SendGameMasterMessagePacket() public method

public SendGameMasterMessagePacket ( ) : void
return void

SendHelmJumpSubPacket() public method

public SendHelmJumpSubPacket ( System.Guid connectionID, float bearing, float distance ) : void
connectionID System.Guid
bearing float
distance float
return void

SendHelmRequestDockSubPacket() public method

public SendHelmRequestDockSubPacket ( System.Guid connectionID ) : void
connectionID System.Guid
return void

SendHelmSetImpulseSubPacket() public method

public SendHelmSetImpulseSubPacket ( System.Guid connectionID, float velocity ) : void
connectionID System.Guid
velocity float
return void

SendHelmSetSteeringSubPacket() public method

public SendHelmSetSteeringSubPacket ( System.Guid connectionID, float turnValue ) : void
connectionID System.Guid
turnValue float
return void

SendHelmSetWarpSubPacket() public method

public SendHelmSetWarpSubPacket ( System.Guid connectionID, int warpFactor ) : void
connectionID System.Guid
warpFactor int
return void

SendHelmToggleReverseSubPacket() public method

public SendHelmToggleReverseSubPacket ( System.Guid connectionID ) : void
connectionID System.Guid
return void

SendLoadTubeSubPacket() public method

public SendLoadTubeSubPacket ( System.Guid connectionID, int tubeIndex, OrdinanceType ordinance ) : void
connectionID System.Guid
tubeIndex int
ordinance OrdinanceType
return void

SendReady2SubPacket() public method

public SendReady2SubPacket ( System.Guid connectionID ) : void
connectionID System.Guid
return void

SendReadySubPacket() public method

public SendReadySubPacket ( System.Guid connectionID ) : void
connectionID System.Guid
return void

SendSciScanSubPacket() public method

public SendSciScanSubPacket ( System.Guid connectionID, int targetID ) : void
connectionID System.Guid
targetID int
return void

SendSciSelectSubPacket() public method

public SendSciSelectSubPacket ( System.Guid connectionID, int targetID ) : void
connectionID System.Guid
targetID int
return void

SendSetBeamFreqSubPacket() public method

public SendSetBeamFreqSubPacket ( System.Guid connectionID, BeamFrequencyTypes frequencyIndex ) : void
connectionID System.Guid
frequencyIndex BeamFrequencyTypes
return void

SendSetMainScreenSubPacket() public method

public SendSetMainScreenSubPacket ( System.Guid connectionID, MainScreenViewTypes value ) : void
connectionID System.Guid
value MainScreenViewTypes
return void

SendSetShipSettingsSubPacket() public method

public SendSetShipSettingsSubPacket ( System.Guid connectionID, DriveType drive, int shipType, int unknown, string shipName ) : void
connectionID System.Guid
drive DriveType
shipType int
unknown int
shipName string
return void

SendSetShipSubPacket() public method

Sends the set ship sub packet.
public SendSetShipSubPacket ( System.Guid connectionID, int selectedShip ) : void
connectionID System.Guid The connection identifier.
selectedShip int The selected ship. (1-based)
return void

SendSetShipSubPacket() public method

public SendSetShipSubPacket ( int selectedShip ) : void
selectedShip int
return void

SendSetStationSubPacket() public method

public SendSetStationSubPacket ( System.Guid connectionID, StationType station, bool isSelected ) : void
connectionID System.Guid
station StationType
isSelected bool
return void

SendSetWeaponsTargetSubPacket() public method

public SendSetWeaponsTargetSubPacket ( System.Guid connectionID, int tubeIndex ) : void
connectionID System.Guid
tubeIndex int
return void

SendToggleAutoBeamsSubPacket() public method

public SendToggleAutoBeamsSubPacket ( System.Guid connectionID ) : void
connectionID System.Guid
return void

SendTogglePerspectiveSubPacket() public method

public SendTogglePerspectiveSubPacket ( System.Guid connectionID ) : void
connectionID System.Guid
return void

SendToggleRedAlert() public method

public SendToggleRedAlert ( System.Guid connectionID ) : void
connectionID System.Guid
return void

SendToggleShields() public method

public SendToggleShields ( System.Guid connectionID ) : void
connectionID System.Guid
return void

SendUnloadTubeSubPacket() public method

public SendUnloadTubeSubPacket ( System.Guid connectionID, int tubeIndex ) : void
connectionID System.Guid
tubeIndex int
return void

SetPort() public method

public SetPort ( int port ) : void
port int
return void

SetServerHost() public method

public SetServerHost ( string host ) : void
host string
return void

StartClientConnection() public method

public StartClientConnection ( TcpClient client ) : void
client System.Net.Sockets.TcpClient
return void

StartClientListener() public method

public StartClientListener ( ) : void
return void