Compare commits
4
Commits
0231d800ef
...
v1.2.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7204003afb | ||
|
|
8811a949fe | ||
|
|
3cda47aa0c | ||
|
|
f3842c0b6e |
@@ -0,0 +1,49 @@
|
|||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio 15
|
||||||
|
VisualStudioVersion = 15.0.28307.136
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot-Utils", "Bot-Utils\Bot-Utils-4.7.1.csproj", "{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "litjson_4.7.1", "..\..\Librarys\litjson\litjson\litjson_4.7.1.csproj", "{91A14CD2-2940-4500-8193-56D37EDDDBAA}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils-IoT", "..\Utils-IoT\Utils-IoT\Utils-IoT-4.7.1.csproj", "{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils", "..\Utils\Utils\Utils-4.7.1.csproj", "{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}"
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Posix", "..\..\Librarys\Mono.Posix\Mono.Posix\Mono.Posix.csproj", "{E2CA132E-E85C-40AD-BE94-B138AA68772B}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {99DB6F34-BD41-4AFF-82B7-E4B3EFDF56DC}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
||||||
+23
-29
@@ -1,17 +1,15 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 15.0.28307.136
|
VisualStudioVersion = 16.0.29519.87
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bot-Utils", "Bot-Utils\Bot-Utils.csproj", "{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot-Utils", "Bot-Utils\Bot-Utils.csproj", "{CB48457C-C567-42BC-9E5B-DAE5A3383108}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "litjson_4.7.1", "..\..\Librarys\litjson\litjson\litjson_4.7.1.csproj", "{91A14CD2-2940-4500-8193-56D37EDDDBAA}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils-IoT", "..\Utils-IoT\Utils-IoT\Utils-IoT.csproj", "{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils-IoT", "..\Utils-IoT\Utils-IoT\Utils-IoT.csproj", "{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils", "..\Utils\Utils\Utils.csproj", "{110EB1ED-1567-4A7E-B8B5-E46F421E0684}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Utils", "..\Utils\Utils\Utils.csproj", "{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "litjson", "..\..\Librarys\litjson\litjson\litjson.csproj", "{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}"
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Posix", "..\..\Librarys\Mono.Posix\Mono.Posix\Mono.Posix.csproj", "{E2CA132E-E85C-40AD-BE94-B138AA68772B}"
|
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
@@ -19,31 +17,27 @@ Global
|
|||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}.Release|Any CPU.Build.0 = Release|Any CPU
|
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{91A14CD2-2940-4500-8193-56D37EDDDBAA}.Release|Any CPU.Build.0 = Release|Any CPU
|
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{B870E4D5-6806-4A0B-B233-8907EEDC5AFC}.Release|Any CPU.Build.0 = Release|Any CPU
|
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{FAC8CE64-BF13-4ECE-8097-AEB5DD060098}.Release|Any CPU.Build.0 = Release|Any CPU
|
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{E2CA132E-E85C-40AD-BE94-B138AA68772B}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {99DB6F34-BD41-4AFF-82B7-E4B3EFDF56DC}
|
SolutionGuid = {0F0DF907-D03F-41A9-B0A2-CA229CC259EE}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
@@ -5,26 +5,16 @@ using System.Net;
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using BlubbFish.Utils.IoT.Connector;
|
|
||||||
using BlubbFish.Utils.IoT.Events;
|
|
||||||
using LitJson;
|
|
||||||
|
|
||||||
namespace BlubbFish.Utils.IoT.Bots {
|
namespace BlubbFish.Utils.IoT.Bots {
|
||||||
public abstract class Webserver : ABot
|
public abstract class AWebserver : ABot {
|
||||||
{
|
|
||||||
protected Dictionary<String, String> config;
|
protected Dictionary<String, String> config;
|
||||||
protected static InIReader requests;
|
|
||||||
protected HttpListener httplistener;
|
|
||||||
protected ABackend databackend;
|
|
||||||
|
|
||||||
public Webserver(ABackend backend, Dictionary<String, String> settings, InIReader requestslookup) {
|
protected HttpListener httplistener;
|
||||||
this.config = settings;
|
|
||||||
requests = requestslookup;
|
public AWebserver(Dictionary<String, String> settings) => this.config = settings;
|
||||||
this.databackend = backend;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void StartListen() {
|
protected void StartListen() {
|
||||||
this.databackend.MessageIncomming += this.Backend_MessageIncomming;
|
|
||||||
this.httplistener = new HttpListener();
|
this.httplistener = new HttpListener();
|
||||||
this.httplistener.Prefixes.Add(this.config["prefix"]);
|
this.httplistener.Prefixes.Add(this.config["prefix"]);
|
||||||
this.httplistener.Start();
|
this.httplistener.Start();
|
||||||
@@ -45,14 +35,64 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Boolean SendFileResponse(HttpListenerContext cont, String folder = "resources", Boolean printOutput = true) {
|
public override void Dispose() {
|
||||||
|
if(this.httplistener.IsListening) {
|
||||||
|
this.httplistener.Stop();
|
||||||
|
}
|
||||||
|
this.httplistener.Close();
|
||||||
|
base.Dispose();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected abstract Boolean SendWebserverResponse(HttpListenerContext cont);
|
||||||
|
}
|
||||||
|
|
||||||
|
#region HttpListener* Extensions
|
||||||
|
public static class HttpListenerHelper {
|
||||||
|
private static InIReader requests;
|
||||||
|
|
||||||
|
public static Dictionary<String, String> GetPostParams(this HttpListenerRequest request) {
|
||||||
|
if(request.HttpMethod == "POST") {
|
||||||
|
if(request.HasEntityBody) {
|
||||||
|
StreamReader reader = new StreamReader(request.InputStream, request.ContentEncoding);
|
||||||
|
String rawData = reader.ReadToEnd();
|
||||||
|
request.InputStream.Close();
|
||||||
|
reader.Close();
|
||||||
|
Dictionary<String, String> ret = new Dictionary<String, String>();
|
||||||
|
foreach(String param in rawData.Split('&')) {
|
||||||
|
String[] kvPair = param.Split('=');
|
||||||
|
if(!ret.ContainsKey(kvPair[0])) {
|
||||||
|
ret.Add(kvPair[0], HttpUtility.UrlDecode(kvPair[1]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return new Dictionary<String, String>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Boolean SendStringResponse(this HttpListenerContext cont, String obj) => cont.SendBinaryResponse(Encoding.UTF8.GetBytes(obj));
|
||||||
|
|
||||||
|
public static Boolean SendBinaryResponse(this HttpListenerContext cont, Byte[] buf) {
|
||||||
|
try {
|
||||||
|
cont.Response.ContentLength64 = buf.Length;
|
||||||
|
cont.Response.OutputStream.Write(buf, 0, buf.Length);
|
||||||
|
Console.WriteLine("200 - " + cont.Request.Url.PathAndQuery);
|
||||||
|
return true;
|
||||||
|
} catch(Exception e) {
|
||||||
|
Helper.WriteError("500 - " + e.Message + "\n\n" + e.StackTrace);
|
||||||
|
cont.Response.StatusCode = 500;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Boolean SendFileResponse(this HttpListenerContext cont, String folder = "resources", Boolean printOutput = true) {
|
||||||
String restr = cont.Request.Url.PathAndQuery;
|
String restr = cont.Request.Url.PathAndQuery;
|
||||||
if(restr.StartsWith("/")) {
|
if(restr.StartsWith("/")) {
|
||||||
restr = restr.IndexOf("?") != -1 ? restr[1..restr.IndexOf("?")] : restr.Substring(1);
|
restr = restr.IndexOf("?") != -1 ? restr[1..restr.IndexOf("?")] : restr[1..];
|
||||||
if(Directory.Exists(folder + "/" + restr)) {
|
if(Directory.Exists(folder + "/" + restr)) {
|
||||||
restr += "/index.html";
|
restr += "/index.html";
|
||||||
}
|
}
|
||||||
String end = restr.IndexOf('.') != -1 ? restr.Substring(restr.IndexOf('.') + 1) : "";
|
String end = restr.IndexOf('.') != -1 ? restr[(restr.IndexOf('.') + 1)..] : "";
|
||||||
if(File.Exists(folder + "/" + restr)) {
|
if(File.Exists(folder + "/" + restr)) {
|
||||||
try {
|
try {
|
||||||
if(end == "png" || end == "jpg" || end == "jpeg" || end == "ico" || end == "woff" || end == "mp4") {
|
if(end == "png" || end == "jpg" || end == "jpeg" || end == "ico" || end == "woff" || end == "mp4") {
|
||||||
@@ -109,53 +149,7 @@ namespace BlubbFish.Utils.IoT.Bots {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Boolean SendJsonResponse(Object data, HttpListenerContext cont) {
|
public static void SetRequestsOverride(InIReader requestslookup) => requests = requestslookup;
|
||||||
try {
|
|
||||||
Byte[] buf = Encoding.UTF8.GetBytes(JsonMapper.ToJson(data));
|
|
||||||
cont.Response.ContentLength64 = buf.Length;
|
|
||||||
cont.Response.OutputStream.Write(buf, 0, buf.Length);
|
|
||||||
Console.WriteLine("200 - " + cont.Request.Url.PathAndQuery);
|
|
||||||
return true;
|
|
||||||
} catch(Exception e) {
|
|
||||||
Helper.WriteError("500 - " + e.Message + "\n\n" + e.StackTrace);
|
|
||||||
cont.Response.StatusCode = 500;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static Dictionary<String, String> GetPostParams(HttpListenerRequest req) {
|
|
||||||
if(req.HttpMethod == "POST") {
|
|
||||||
if(req.HasEntityBody) {
|
|
||||||
StreamReader reader = new StreamReader(req.InputStream, req.ContentEncoding);
|
|
||||||
String rawData = reader.ReadToEnd();
|
|
||||||
req.InputStream.Close();
|
|
||||||
reader.Close();
|
|
||||||
Dictionary<String, String> ret = new Dictionary<String, String>();
|
|
||||||
foreach(String param in rawData.Split('&')) {
|
|
||||||
String[] kvPair = param.Split('=');
|
|
||||||
if(!ret.ContainsKey(kvPair[0])) {
|
|
||||||
ret.Add(kvPair[0], HttpUtility.UrlDecode(kvPair[1]));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return new Dictionary<String, String>();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void Dispose() {
|
|
||||||
if(this.httplistener.IsListening) {
|
|
||||||
this.httplistener.Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.httplistener.Close();
|
|
||||||
if(this.databackend != null) {
|
|
||||||
this.databackend.Dispose();
|
|
||||||
}
|
|
||||||
base.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected abstract void Backend_MessageIncomming(Object sender, BackendEvent e);
|
|
||||||
protected abstract Boolean SendWebserverResponse(HttpListenerContext cont);
|
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
using BlubbFish.Utils.IoT.Connector;
|
||||||
|
using BlubbFish.Utils.IoT.Events;
|
||||||
|
|
||||||
|
namespace BlubbFish.Utils.IoT.Bots {
|
||||||
|
public abstract class AWebserverDataBackend : AWebserver {
|
||||||
|
protected ABackend databackend;
|
||||||
|
protected AWebserverDataBackend(ABackend backend, Dictionary<String, String> settings) : base(settings) => this.databackend = backend;
|
||||||
|
|
||||||
|
protected void StartDataBackend() => this.databackend.MessageIncomming += this.Backend_MessageIncomming;
|
||||||
|
|
||||||
|
protected abstract void Backend_MessageIncomming(Object sender, BackendEvent e);
|
||||||
|
|
||||||
|
public override void Dispose() {
|
||||||
|
if(this.databackend != null) {
|
||||||
|
this.databackend.Dispose();
|
||||||
|
}
|
||||||
|
base.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
|
<ProjectGuid>{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}</ProjectGuid>
|
||||||
|
<OutputType>Library</OutputType>
|
||||||
|
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||||
|
<RootNamespace>BlubbFish.Utils.IoT.Bots</RootNamespace>
|
||||||
|
<AssemblyName>Bot-Utils</AssemblyName>
|
||||||
|
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||||
|
<FileAlignment>512</FileAlignment>
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
|
<DebugSymbols>true</DebugSymbols>
|
||||||
|
<DebugType>full</DebugType>
|
||||||
|
<Optimize>false</Optimize>
|
||||||
|
<OutputPath>bin\Debug\</OutputPath>
|
||||||
|
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||||
|
<DebugType>pdbonly</DebugType>
|
||||||
|
<Optimize>true</Optimize>
|
||||||
|
<OutputPath>bin\Release\</OutputPath>
|
||||||
|
<DefineConstants>TRACE</DefineConstants>
|
||||||
|
<ErrorReport>prompt</ErrorReport>
|
||||||
|
<WarningLevel>4</WarningLevel>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<StartupObject />
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Core" />
|
||||||
|
<Reference Include="System.Web" />
|
||||||
|
<Reference Include="System.Xml.Linq" />
|
||||||
|
<Reference Include="System.Data.DataSetExtensions" />
|
||||||
|
<Reference Include="Microsoft.CSharp" />
|
||||||
|
<Reference Include="System.Data" />
|
||||||
|
<Reference Include="System.Net.Http" />
|
||||||
|
<Reference Include="System.Xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Compile Include="ABot.cs" />
|
||||||
|
<Compile Include="Bot.cs" />
|
||||||
|
<Compile Include="Events\CronEvent.cs" />
|
||||||
|
<Compile Include="Events\ModulEventArgs.cs" />
|
||||||
|
<Compile Include="Events\SenmlEvent.cs" />
|
||||||
|
<Compile Include="Events\MqttEvent.cs" />
|
||||||
|
<Compile Include="Events\OvertakerEvent.cs" />
|
||||||
|
<Compile Include="Events\StatusPollingEvent.cs" />
|
||||||
|
<Compile Include="Interfaces\IForceLoad.cs" />
|
||||||
|
<Compile Include="Moduls\AModul.cs" />
|
||||||
|
<Compile Include="Moduls\CronJob.cs" />
|
||||||
|
<Compile Include="Moduls\Mqtt.cs" />
|
||||||
|
<Compile Include="Moduls\Overtaker.cs" />
|
||||||
|
<Compile Include="Moduls\Statuspolling.cs" />
|
||||||
|
<Compile Include="MultiSourceBot.cs" />
|
||||||
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
|
<Compile Include="Webserver.cs" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="..\CHANGELOG.md" />
|
||||||
|
<Content Include="..\CONTRIBUTING.md" />
|
||||||
|
<Content Include="..\LICENSE" />
|
||||||
|
<Content Include="..\README.md" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\..\Librarys\litjson\litjson\litjson_4.7.1.csproj">
|
||||||
|
<Project>{91a14cd2-2940-4500-8193-56d37edddbaa}</Project>
|
||||||
|
<Name>litjson_4.7.1</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\..\Librarys\Mono.Posix\Mono.Posix\Mono.Posix.csproj">
|
||||||
|
<Project>{e2ca132e-e85c-40ad-be94-b138aa68772b}</Project>
|
||||||
|
<Name>Mono.Posix</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\Utils-IoT\Utils-IoT\Utils-IoT.csproj">
|
||||||
|
<Project>{b870e4d5-6806-4a0b-b233-8907eedc5afc}</Project>
|
||||||
|
<Name>Utils-IoT</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
<ProjectReference Include="..\..\Utils\Utils\Utils.csproj">
|
||||||
|
<Project>{fac8ce64-bf13-4ece-8097-aeb5dd060098}</Project>
|
||||||
|
<Name>Utils</Name>
|
||||||
|
</ProjectReference>
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
|
</Project>
|
||||||
+44
-81
@@ -1,92 +1,55 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
|
||||||
<ProjectGuid>{BB7BFCB5-3DB0-49E1-802A-3CE3EECC59F9}</ProjectGuid>
|
|
||||||
<OutputType>Library</OutputType>
|
|
||||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
|
||||||
<RootNamespace>BlubbFish.Utils.IoT.Bots</RootNamespace>
|
<RootNamespace>BlubbFish.Utils.IoT.Bots</RootNamespace>
|
||||||
<AssemblyName>Bot-Utils</AssemblyName>
|
<AssemblyName>Bot-Utils</AssemblyName>
|
||||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
<PackageId>Bots.IoT.Utils.BlubbFish</PackageId>
|
||||||
<FileAlignment>512</FileAlignment>
|
<Version>1.2.2</Version>
|
||||||
<NuGetPackageImportStamp>
|
<AssemblyVersion>1.2.2</AssemblyVersion>
|
||||||
</NuGetPackageImportStamp>
|
<FileVersion>1.2.2</FileVersion>
|
||||||
</PropertyGroup>
|
<NeutralLanguage>de-DE</NeutralLanguage>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<Description>Bot-Utils are helpers for programming a bot</Description>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<Authors>BlubbFish</Authors>
|
||||||
<DebugType>full</DebugType>
|
<Company>BlubbFish</Company>
|
||||||
<Optimize>false</Optimize>
|
<Copyright>Copyright © BlubbFish 2018 - 22.08.2021</Copyright>
|
||||||
<OutputPath>bin\Debug\</OutputPath>
|
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
<PackageProjectUrl>http://git.blubbfish.net/vs_utils/Bot-Utils</PackageProjectUrl>
|
||||||
<ErrorReport>prompt</ErrorReport>
|
<RepositoryUrl>http://git.blubbfish.net/vs_utils/Bot-Utils.git</RepositoryUrl>
|
||||||
<WarningLevel>4</WarningLevel>
|
<RepositoryType>git</RepositoryType>
|
||||||
</PropertyGroup>
|
<PackageReleaseNotes>1.2.2 Going to netcore
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
1.2.1 When using Dispose, kill also mqtt connection and other tiny fixes
|
||||||
<DebugType>pdbonly</DebugType>
|
1.2.0 Refactor Bot to ABot and refere MultiSourceBot, Webserver and Bot to it. Add MultiSourceBot. Rewrite Mqtt module so that it not need to watch the connection.
|
||||||
<Optimize>true</Optimize>
|
1.1.9 Modify Output of SendFileResponse
|
||||||
<OutputPath>bin\Release\</OutputPath>
|
1.1.8 Add logger to Webserver Class
|
||||||
<DefineConstants>TRACE</DefineConstants>
|
1.1.7 Restrucutre loading, so that all is init and after the listener is started, REQUEST_URL_HOST gives now host and port
|
||||||
<ErrorReport>prompt</ErrorReport>
|
1.1.6 rename functions and make SendFileResponse with a parameter for the folder (default resources), also put returntype boolean, add function that parse post params, if path is a dictionary try to load index.html
|
||||||
<WarningLevel>4</WarningLevel>
|
1.1.5 add a function to send an object as json directly
|
||||||
</PropertyGroup>
|
1.1.4 add Woff as Binary type
|
||||||
<PropertyGroup>
|
1.1.3 Variables parsing now as a String
|
||||||
<StartupObject />
|
1.1.2 Fixing bug for Contenttype
|
||||||
|
1.1.1 Update to local librarys
|
||||||
|
1.1.0 Remove Helper from Bot-Utils</PackageReleaseNotes>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="System" />
|
<ProjectReference Include="..\..\..\Librarys\litjson\litjson\litjson.csproj" />
|
||||||
<Reference Include="System.Core" />
|
<ProjectReference Include="..\..\Utils-IoT\Utils-IoT\Utils-IoT.csproj" />
|
||||||
<Reference Include="System.Web" />
|
<ProjectReference Include="..\..\Utils\Utils\Utils.csproj" />
|
||||||
<Reference Include="System.Xml.Linq" />
|
|
||||||
<Reference Include="System.Data.DataSetExtensions" />
|
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="System.Data" />
|
|
||||||
<Reference Include="System.Net.Http" />
|
|
||||||
<Reference Include="System.Xml" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="ABot.cs" />
|
<Content Include="../CHANGELOG.md" />
|
||||||
<Compile Include="Bot.cs" />
|
<Content Include="../CONTRIBUTING.md" />
|
||||||
<Compile Include="Events\CronEvent.cs" />
|
<Content Include="../LICENSE" />
|
||||||
<Compile Include="Events\ModulEventArgs.cs" />
|
<Content Include="../README.md" />
|
||||||
<Compile Include="Events\SenmlEvent.cs" />
|
|
||||||
<Compile Include="Events\MqttEvent.cs" />
|
|
||||||
<Compile Include="Events\OvertakerEvent.cs" />
|
|
||||||
<Compile Include="Events\StatusPollingEvent.cs" />
|
|
||||||
<Compile Include="Interfaces\IForceLoad.cs" />
|
|
||||||
<Compile Include="Moduls\AModul.cs" />
|
|
||||||
<Compile Include="Moduls\CronJob.cs" />
|
|
||||||
<Compile Include="Moduls\Mqtt.cs" />
|
|
||||||
<Compile Include="Moduls\Overtaker.cs" />
|
|
||||||
<Compile Include="Moduls\Statuspolling.cs" />
|
|
||||||
<Compile Include="MultiSourceBot.cs" />
|
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
|
||||||
<Compile Include="Webserver.cs" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Content Include="..\CHANGELOG.md" />
|
<None Include="..\LICENSE">
|
||||||
<Content Include="..\CONTRIBUTING.md" />
|
<Pack>True</Pack>
|
||||||
<Content Include="..\LICENSE" />
|
<PackagePath></PackagePath>
|
||||||
<Content Include="..\README.md" />
|
</None>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\..\Librarys\litjson\litjson\litjson_4.7.1.csproj">
|
|
||||||
<Project>{91a14cd2-2940-4500-8193-56d37edddbaa}</Project>
|
|
||||||
<Name>litjson_4.7.1</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\..\..\Librarys\Mono.Posix\Mono.Posix\Mono.Posix.csproj">
|
|
||||||
<Project>{e2ca132e-e85c-40ad-be94-b138aa68772b}</Project>
|
|
||||||
<Name>Mono.Posix</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\..\Utils-IoT\Utils-IoT\Utils-IoT.csproj">
|
|
||||||
<Project>{b870e4d5-6806-4a0b-b233-8907eedc5afc}</Project>
|
|
||||||
<Name>Utils-IoT</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
<ProjectReference Include="..\..\Utils\Utils\Utils.csproj">
|
|
||||||
<Project>{fac8ce64-bf13-4ece-8097-aeb5dd060098}</Project>
|
|
||||||
<Name>Utils</Name>
|
|
||||||
</ProjectReference>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>netcoreapp3.0</TargetFramework>
|
|
||||||
<RootNamespace>BlubbFish.Utils.IoT.Bots</RootNamespace>
|
|
||||||
<AssemblyName>Bot-Utils</AssemblyName>
|
|
||||||
<PackageId>Bots.IoT.Utils.BlubbFish</PackageId>
|
|
||||||
<Version>1.2.1</Version>
|
|
||||||
<AssemblyVersion>1.2.1</AssemblyVersion>
|
|
||||||
<FileVersion>1.2.1</FileVersion>
|
|
||||||
<NeutralLanguage>de-DE</NeutralLanguage>
|
|
||||||
<Description>Bot-Utils are helpers for programming a bot</Description>
|
|
||||||
<Authors>BlubbFish</Authors>
|
|
||||||
<Company>BlubbFish</Company>
|
|
||||||
<Copyright>Copyright © BlubbFish 2018 - 30.08.2019</Copyright>
|
|
||||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
|
||||||
<PackageProjectUrl>http://git.blubbfish.net/vs_utils/Bot-Utils</PackageProjectUrl>
|
|
||||||
<RepositoryUrl>http://git.blubbfish.net/vs_utils/Bot-Utils.git</RepositoryUrl>
|
|
||||||
<RepositoryType>git</RepositoryType>
|
|
||||||
<PackageReleaseNotes>1.2.1 When using Dispose, kill also mqtt connection and other tiny fixes
|
|
||||||
1.2.0 Refactor Bot to ABot and refere MultiSourceBot, Webserver and Bot to it. Add MultiSourceBot. Rewrite Mqtt module so that it not need to watch the connection.
|
|
||||||
1.1.9 Modify Output of SendFileResponse
|
|
||||||
1.1.8 Add logger to Webserver Class
|
|
||||||
1.1.7 Restrucutre loading, so that all is init and after the listener is started, REQUEST_URL_HOST gives now host and port
|
|
||||||
1.1.6 rename functions and make SendFileResponse with a parameter for the folder (default resources), also put returntype boolean, add function that parse post params, if path is a dictionary try to load index.html
|
|
||||||
1.1.5 add a function to send an object as json directly
|
|
||||||
1.1.4 add Woff as Binary type
|
|
||||||
1.1.3 Variables parsing now as a String
|
|
||||||
1.1.2 Fixing bug for Contenttype
|
|
||||||
1.1.1 Update to local librarys
|
|
||||||
1.1.0 Remove Helper from Bot-Utils</PackageReleaseNotes>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\..\..\Librarys\litjson\litjson\litjson_Core.csproj" />
|
|
||||||
<ProjectReference Include="..\..\Utils-IoT\Utils-IoT\Utils-IoT_Core.csproj" />
|
|
||||||
<ProjectReference Include="..\..\Utils\Utils\Utils_Core.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="../CHANGELOG.md" />
|
|
||||||
<Content Include="../CONTRIBUTING.md" />
|
|
||||||
<Content Include="../LICENSE" />
|
|
||||||
<Content Include="../README.md" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<None Include="..\LICENSE">
|
|
||||||
<Pack>True</Pack>
|
|
||||||
<PackagePath></PackagePath>
|
|
||||||
</None>
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.29519.87
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Bot-Utils_Core", "Bot-Utils\Bot-Utils_Core.csproj", "{CB48457C-C567-42BC-9E5B-DAE5A3383108}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils-IoT_Core", "..\Utils-IoT\Utils-IoT\Utils-IoT_Core.csproj", "{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Utils_Core", "..\Utils\Utils\Utils_Core.csproj", "{110EB1ED-1567-4A7E-B8B5-E46F421E0684}"
|
|
||||||
EndProject
|
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "litjson_Core", "..\..\Librarys\litjson\litjson\litjson_Core.csproj", "{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{CB48457C-C567-42BC-9E5B-DAE5A3383108}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{86E9D6ED-EE31-4FE7-AEA6-555DBBAA69A4}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{110EB1ED-1567-4A7E-B8B5-E46F421E0684}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{A6EB1FF2-A3F1-4C97-8E7F-0F2CE4A8A820}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {0F0DF907-D03F-41A9-B0A2-CA229CC259EE}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
## 1.2.2 - Going to netcore
|
||||||
|
### New Features
|
||||||
|
* Split Wbserver to AWebserver and AWebserverDataBackend
|
||||||
|
* Add mp4 as binary content
|
||||||
|
* make a mirror of this repo on github
|
||||||
|
### Changes
|
||||||
|
* change to c+ newer coding style
|
||||||
|
* mograde to c# netcore 3.1
|
||||||
|
|
||||||
|
## 1.2.1
|
||||||
|
### New Features
|
||||||
|
* Add LICENSE, CONTRIBUTING.md and README.md
|
||||||
|
### Bugfixes
|
||||||
|
* When using Dispose, kill also mqtt connection
|
||||||
|
### Changes
|
||||||
|
* A bit more debugging
|
||||||
|
|
||||||
|
## 1.2.0
|
||||||
|
### New Features
|
||||||
|
* Add MultiSourceBot*
|
||||||
|
* Refere MultiSourceBot, Webserver and Bot to it.
|
||||||
|
### Changes
|
||||||
|
* Refactor Bot to ABot
|
||||||
|
* Rewrite Mqtt module so that it not need to watch the connection.
|
||||||
|
|
||||||
|
## 1.1.9
|
||||||
|
### New Features
|
||||||
|
* Modify Output of SendFileResponse
|
||||||
|
|
||||||
|
## 1.1.8
|
||||||
|
### New Features
|
||||||
|
* Add logger to Webserver Class
|
||||||
|
|
||||||
|
## 1.1.7
|
||||||
|
### Changes
|
||||||
|
* Restrucutre loading, so that all is init and after the listener is started, REQUEST_URL_HOST gives now host and port
|
||||||
|
|
||||||
|
## 1.1.6
|
||||||
|
### New Features
|
||||||
|
* SendFileResponse with a parameter for the folder
|
||||||
|
* add function that parse post params
|
||||||
|
|
||||||
|
## 1.1.5
|
||||||
|
### New Features
|
||||||
|
* add a function to send an object as json directly
|
||||||
|
|
||||||
|
## 1.1.4
|
||||||
|
### New Features
|
||||||
|
* add Woff as Binary type
|
||||||
|
|
||||||
|
## 1.1.3
|
||||||
|
### Changes
|
||||||
|
* Variables parsing now as a String
|
||||||
|
|
||||||
|
## 1.1.2
|
||||||
|
### Bugfixes
|
||||||
|
* Fixing bug for Contenttype
|
||||||
|
|
||||||
|
## 1.1.1
|
||||||
|
### Changes
|
||||||
|
* Update to local librarys
|
||||||
|
|
||||||
|
## 1.1.0
|
||||||
|
### New Features
|
||||||
|
* Remove Helper from Bot-Utils
|
||||||
@@ -1,11 +1,12 @@
|
|||||||
# BlubbFish.Utils.IoT.Bots (Bot-Utils)
|
# BlubbFish.Utils.IoT.Bots (Bot-Utils)
|
||||||
Library that makes it easier to create bots.
|
Library that makes it easier to create bots.
|
||||||
|
|
||||||
|
Maybe you find this Repo on Github. This is a mirror from [here](https://git.blubbfish.net/vs_utils/Bot-Utils).
|
||||||
|
|
||||||
## Linking to
|
## Linking to
|
||||||
### Internal
|
### Internal
|
||||||
* BlubbFish.Utils ([Utils](http://git.blubbfish.net/vs_utils/Utils))
|
* BlubbFish.Utils ([Utils](http://git.blubbfish.net/vs_utils/Utils))
|
||||||
* BlubbFish.Utils.IoT ([Utils-IoT](http://git.blubbfish.net/vs_utils/Utils-IoT))
|
* BlubbFish.Utils.IoT ([Utils-IoT](http://git.blubbfish.net/vs_utils/Utils-IoT))
|
||||||
|
|
||||||
### External
|
### External
|
||||||
* litjson
|
* litjson ([Used Fork](https://github.com/blubbfish/litjson), [Original](https://github.com/LitJSON/litjson))
|
||||||
* Mono.Posix
|
|
||||||
Reference in New Issue
Block a user