Skip to content

Commit

Permalink
Added Protocot Support
Browse files Browse the repository at this point in the history
Updated RemoteEffectServer to listen for /api/Effect
  • Loading branch information
dellis1972 committed Feb 22, 2016
1 parent 6e12fc1 commit c9586fa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion InfinitespaceStudios.Pipeline/RemoteEffectProcessor.cs
Expand Up @@ -27,9 +27,13 @@ class RemoteEffectProcessor : EffectProcessor
[DefaultValue ("443")]
public string RemotePort { get; set; }

[DefaultValue ("https")]
public string Protocol { get; set; }

public RemoteEffectProcessor ()
{
RemotePort = "443";
Protocol = "https";
RemoteAddress = "pipeline.infinitespace-studios.co.uk";
}

Expand All @@ -41,7 +45,7 @@ public override CompiledEffectContent Process (EffectContent input, ContentProce
var code = input.EffectCode;
var platform = context.TargetPlatform;
var client = new HttpClient ();
client.BaseAddress = new Uri (string.Format ("https://{0}:{1}/", RemoteAddress, RemotePort));
client.BaseAddress = new Uri (string.Format ("{0}://{1}:{2}/", Protocol, RemoteAddress, RemotePort));
var response = client.PostAsync ("api/Effect", new StringContent (JsonSerializer (new Data () {
Platform = platform.ToString(),
Code = code
Expand Down
Expand Up @@ -3,6 +3,7 @@
<Role name="PipelineRole">
<Instances count="1" />
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=remoteeffectservice;AccountKey=td9SdGcYVwBZOaYEY0SoSzsTG8ovf//i8NSxGdFLO+8NcEkjNzLRR6Q6jfElonNEl5PI/lHd/Y3IY+1RShTdNQ==" />
</ConfigurationSettings>
<Certificates>
<Certificate name="pipelinessl" thumbprint="7CD7C89BF1B8F12B4C235A39D7F046B2DCFACA0D" thumbprintAlgorithm="sha1" />
Expand Down
2 changes: 1 addition & 1 deletion InfinitespaceStudios.RemoteEffectServer/Program.cs
Expand Up @@ -18,7 +18,7 @@ public static void Main (string[] args)


var listener = new System.Net.HttpListener();
listener.Prefixes.Add(string.Format("http://*:{0}/effect/", port));
listener.Prefixes.Add(string.Format("http://*:{0}/api/Effect/", port));
listener.Start();
ThreadPool.QueueUserWorkItem((o) =>
{
Expand Down

0 comments on commit c9586fa

Please sign in to comment.