-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Added in SSL support for both AMQPS and HTTPS including SslHelper cl…
…ass. -Support for queue subscriptions. -Added in methods that query RabbitMQ REST API to query exchanges and queues. -Added more events for both IAmqpBrokerConnection and AmqpClient. -Filled out AmqpClient implementation more so it has more complete parity with IAmqpBrokerConnection. -Updated the AmqpDemo scene form design, added exchange dropdowns instead of text fields, and added a message publishing form. -Various bug fixes and updates.
- Loading branch information
Showing
24 changed files
with
681 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System; | ||
|
||
namespace CymaticLabs.Unity3D.Amqp | ||
{ | ||
/// <summary> | ||
/// Event agurment for events that relate to an exception. | ||
/// </summary> | ||
public class ExceptionEventArgs : EventArgs | ||
{ | ||
/// <summary> | ||
/// Gets the exception that occurred as part of the event. | ||
/// </summary> | ||
public Exception Exception { get; private set; } | ||
|
||
/// <summary> | ||
/// Creates a new event argument for the given exception. | ||
/// </summary> | ||
/// <param name="ex">The exception that occurred.</param> | ||
public ExceptionEventArgs(Exception ex) | ||
{ | ||
if (ex == null) throw new ArgumentNullException("ex"); | ||
this.Exception = ex; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
using System; | ||
using System.Net; | ||
using System.Net.Security; | ||
using System.Security.Cryptography.X509Certificates; | ||
|
||
namespace CymaticLabs.Unity3D.Amqp | ||
{ | ||
/// <summary> | ||
/// Class used for helping with SSL/TLS. | ||
/// </summary> | ||
public static class SslHelper | ||
{ | ||
#region Constructor | ||
|
||
static SslHelper() | ||
{ | ||
// Setup custom SSL validation to avoid Mono SSL issues (slightly unsecure) | ||
ServicePointManager.ServerCertificateValidationCallback = SslHelper.RemoteCertificateValidationCallback; | ||
} | ||
|
||
#endregion Constructor | ||
|
||
#region Methods | ||
|
||
/// <summary> | ||
/// Custom SSL certificate validation callback. | ||
/// </summary> | ||
public static bool RemoteCertificateValidationCallback(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) | ||
{ | ||
bool isOk = true; | ||
// If there are errors in the certificate chain, look at each error to determine the cause. | ||
if (sslPolicyErrors != SslPolicyErrors.None) | ||
{ | ||
for (int i = 0; i < chain.ChainStatus.Length; i++) | ||
{ | ||
if (chain.ChainStatus[i].Status != X509ChainStatusFlags.RevocationStatusUnknown) | ||
{ | ||
chain.ChainPolicy.RevocationFlag = X509RevocationFlag.EntireChain; | ||
chain.ChainPolicy.RevocationMode = X509RevocationMode.Online; | ||
chain.ChainPolicy.UrlRetrievalTimeout = new TimeSpan(0, 1, 0); | ||
chain.ChainPolicy.VerificationFlags = X509VerificationFlags.AllFlags; | ||
bool chainIsValid = chain.Build(new X509Certificate2(certificate)); | ||
if (!chainIsValid) | ||
{ | ||
isOk = false; | ||
} | ||
} | ||
} | ||
} | ||
return isOk; | ||
} | ||
|
||
#endregion Methods | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file modified
BIN
-3 KB
(94%)
unity/CymaticLabs.UnityAmqp/Assets/CymaticLabs/Amqp/Plugins/CymaticLabs.Unity3D.Amqp.dll
Binary file not shown.
Binary file modified
BIN
-25 KB
(90%)
unity/CymaticLabs.UnityAmqp/Assets/CymaticLabs/Amqp/Plugins/RabbitMQ.Client.dll
Binary file not shown.
Binary file added
BIN
+16.2 KB
unity/CymaticLabs.UnityAmqp/Assets/CymaticLabs/Amqp/Prefabs/AmqpClient.prefab
Binary file not shown.
8 changes: 8 additions & 0 deletions
8
unity/CymaticLabs.UnityAmqp/Assets/CymaticLabs/Amqp/Prefabs/AmqpClient.prefab.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file modified
BIN
+15.6 KB
(120%)
unity/CymaticLabs.UnityAmqp/Assets/CymaticLabs/Amqp/Prefabs/AmqpForm.prefab
Binary file not shown.
Binary file modified
BIN
-7.73 KB
(69%)
unity/CymaticLabs.UnityAmqp/Assets/CymaticLabs/Amqp/Scenes/AmqpDemo.unity
Binary file not shown.
Oops, something went wrong.