diff --git a/FileTransferClient/App.config b/FileTransferClient/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/FileTransferClient/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FileTransferClient/App.xaml b/FileTransferClient/App.xaml
new file mode 100644
index 0000000..d9a13ea
--- /dev/null
+++ b/FileTransferClient/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/FileTransferClient/App.xaml.cs b/FileTransferClient/App.xaml.cs
new file mode 100644
index 0000000..70866b3
--- /dev/null
+++ b/FileTransferClient/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace FileTransferClient
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/FileTransferClient/FileTransferClient.csproj b/FileTransferClient/FileTransferClient.csproj
new file mode 100644
index 0000000..9f3e473
--- /dev/null
+++ b/FileTransferClient/FileTransferClient.csproj
@@ -0,0 +1,104 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {F8B727E1-340D-4096-A784-E570AE13FABC}
+ WinExe
+ FileTransferClient
+ FileTransferClient
+ v4.7.2
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+ {06c9e60e-d449-41a7-9bf0-a829aaf5d214}
+ ZeroLevel
+
+
+
+
\ No newline at end of file
diff --git a/FileTransferClient/MainWindow.xaml b/FileTransferClient/MainWindow.xaml
new file mode 100644
index 0000000..286f37b
--- /dev/null
+++ b/FileTransferClient/MainWindow.xaml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FileTransferClient/MainWindow.xaml.cs b/FileTransferClient/MainWindow.xaml.cs
new file mode 100644
index 0000000..49a9234
--- /dev/null
+++ b/FileTransferClient/MainWindow.xaml.cs
@@ -0,0 +1,38 @@
+using Microsoft.Win32;
+using System.Windows;
+using ZeroLevel.Services.Network.FileTransfer;
+
+namespace FileTransferClient
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ private IFileClient client;
+
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ client = FileClientFactory.Create(tbEndpoint.Text, System.IO.Path.Combine(ZeroLevel.Configuration.BaseDirectory, "INCOMING"));
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ var ofd = new OpenFileDialog();
+ if (ofd.ShowDialog() == true)
+ {
+ client.Send(ofd.FileName);
+ }
+ }
+
+ private void Button_Click_2(object sender, RoutedEventArgs e)
+ {
+
+ }
+ }
+}
diff --git a/FileTransferClient/Properties/AssemblyInfo.cs b/FileTransferClient/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..c36d254
--- /dev/null
+++ b/FileTransferClient/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("FileTransferClient")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("FileTransferClient")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/FileTransferClient/Properties/Resources.Designer.cs b/FileTransferClient/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..bfe9b61
--- /dev/null
+++ b/FileTransferClient/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace FileTransferClient.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FileTransferClient.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/FileTransferClient/Properties/Resources.resx b/FileTransferClient/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/FileTransferClient/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FileTransferClient/Properties/Settings.Designer.cs b/FileTransferClient/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..b7f3576
--- /dev/null
+++ b/FileTransferClient/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace FileTransferClient.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/FileTransferClient/Properties/Settings.settings b/FileTransferClient/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/FileTransferClient/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FileTransferServer/App.config b/FileTransferServer/App.config
new file mode 100644
index 0000000..56efbc7
--- /dev/null
+++ b/FileTransferServer/App.config
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/FileTransferServer/App.xaml b/FileTransferServer/App.xaml
new file mode 100644
index 0000000..06f1d93
--- /dev/null
+++ b/FileTransferServer/App.xaml
@@ -0,0 +1,9 @@
+
+
+
+
+
diff --git a/FileTransferServer/App.xaml.cs b/FileTransferServer/App.xaml.cs
new file mode 100644
index 0000000..7cfddee
--- /dev/null
+++ b/FileTransferServer/App.xaml.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.Configuration;
+using System.Data;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows;
+
+namespace FileTransferServer
+{
+ ///
+ /// Interaction logic for App.xaml
+ ///
+ public partial class App : Application
+ {
+ }
+}
diff --git a/FileTransferServer/FileTransferServer.csproj b/FileTransferServer/FileTransferServer.csproj
new file mode 100644
index 0000000..d2186e3
--- /dev/null
+++ b/FileTransferServer/FileTransferServer.csproj
@@ -0,0 +1,104 @@
+
+
+
+
+ Debug
+ AnyCPU
+ {9BF859EE-EF90-4B5B-8576-E26770F2F792}
+ WinExe
+ FileTransferServer
+ FileTransferServer
+ v4.7.2
+ 512
+ {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
+ 4
+ true
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ bin\Debug\
+ DEBUG;TRACE
+ prompt
+ 4
+
+
+ AnyCPU
+ pdbonly
+ true
+ bin\Release\
+ TRACE
+ prompt
+ 4
+
+
+
+
+
+
+
+
+
+
+
+ 4.0
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ App.xaml
+ Code
+
+
+ MainWindow.xaml
+ Code
+
+
+
+
+ Code
+
+
+ True
+ True
+ Resources.resx
+
+
+ True
+ Settings.settings
+ True
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+ SettingsSingleFileGenerator
+ Settings.Designer.cs
+
+
+
+
+
+
+
+ {06c9e60e-d449-41a7-9bf0-a829aaf5d214}
+ ZeroLevel
+
+
+
+
\ No newline at end of file
diff --git a/FileTransferServer/MainWindow.xaml b/FileTransferServer/MainWindow.xaml
new file mode 100644
index 0000000..5719b81
--- /dev/null
+++ b/FileTransferServer/MainWindow.xaml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/FileTransferServer/MainWindow.xaml.cs b/FileTransferServer/MainWindow.xaml.cs
new file mode 100644
index 0000000..57ce261
--- /dev/null
+++ b/FileTransferServer/MainWindow.xaml.cs
@@ -0,0 +1,46 @@
+using System.IO;
+using System.Windows;
+using ZeroLevel.Services.Network.FileTransfer;
+
+namespace FileTransferServer
+{
+ ///
+ /// Interaction logic for MainWindow.xaml
+ ///
+ public partial class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+ }
+
+ private IFileServer _server;
+
+ private void Button_Click(object sender, RoutedEventArgs e)
+ {
+ int port = -1;
+ if (!int.TryParse(tbPort.Text, out port)) port = -1;
+ if (!Directory.Exists(tbFolder.Text))
+ {
+ try
+ {
+ Directory.CreateDirectory(tbFolder.Text);
+ }
+ catch { }
+ }
+ if (port == -1 || !Directory.Exists(tbFolder.Text))
+ {
+ MessageBox.Show("Incorrect parameters");
+ return;
+ }
+
+ _server = FileServerFactory.Create(port, tbFolder.Text);
+ }
+
+ private void Button_Click_1(object sender, RoutedEventArgs e)
+ {
+ _server?.Dispose();
+ _server = null;
+ }
+ }
+}
diff --git a/FileTransferServer/Properties/AssemblyInfo.cs b/FileTransferServer/Properties/AssemblyInfo.cs
new file mode 100644
index 0000000..ee5e31f
--- /dev/null
+++ b/FileTransferServer/Properties/AssemblyInfo.cs
@@ -0,0 +1,55 @@
+using System.Reflection;
+using System.Resources;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Windows;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("FileTransferServer")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("FileTransferServer")]
+[assembly: AssemblyCopyright("Copyright © 2019")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+//In order to begin building localizable applications, set
+//CultureYouAreCodingWith in your .csproj file
+//inside a . For example, if you are using US english
+//in your source files, set the to en-US. Then uncomment
+//the NeutralResourceLanguage attribute below. Update the "en-US" in
+//the line below to match the UICulture setting in the project file.
+
+//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
+
+
+[assembly: ThemeInfo(
+ ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
+ //(used if a resource is not found in the page,
+ // or application resource dictionaries)
+ ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
+ //(used if a resource is not found in the page,
+ // app, or any theme specific resource dictionaries)
+)]
+
+
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
diff --git a/FileTransferServer/Properties/Resources.Designer.cs b/FileTransferServer/Properties/Resources.Designer.cs
new file mode 100644
index 0000000..1f1bd16
--- /dev/null
+++ b/FileTransferServer/Properties/Resources.Designer.cs
@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace FileTransferServer.Properties
+{
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if ((resourceMan == null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FileTransferServer.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ }
+}
diff --git a/FileTransferServer/Properties/Resources.resx b/FileTransferServer/Properties/Resources.resx
new file mode 100644
index 0000000..af7dbeb
--- /dev/null
+++ b/FileTransferServer/Properties/Resources.resx
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/FileTransferServer/Properties/Settings.Designer.cs b/FileTransferServer/Properties/Settings.Designer.cs
new file mode 100644
index 0000000..50bcd50
--- /dev/null
+++ b/FileTransferServer/Properties/Settings.Designer.cs
@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace FileTransferServer.Properties
+{
+
+
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+ internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+ {
+
+ private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+ public static Settings Default
+ {
+ get
+ {
+ return defaultInstance;
+ }
+ }
+ }
+}
diff --git a/FileTransferServer/Properties/Settings.settings b/FileTransferServer/Properties/Settings.settings
new file mode 100644
index 0000000..033d7a5
--- /dev/null
+++ b/FileTransferServer/Properties/Settings.settings
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ZeroLevel.sln b/ZeroLevel.sln
index aa25193..aee7a28 100644
--- a/ZeroLevel.sln
+++ b/ZeroLevel.sln
@@ -11,6 +11,12 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "TestApp", "TestApp\TestApp.
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ZeroLevel.Discovery", "ZeroLevel.Discovery\ZeroLevel.Discovery.csproj", "{5CE51CC9-7884-4E21-9D68-2321CA14312E}"
EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "FileTransferTest", "FileTransferTest", "{FC074553-5D9F-4DF1-9130-7092E37DE768}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileTransferClient", "FileTransferClient\FileTransferClient.csproj", "{F8B727E1-340D-4096-A784-E570AE13FABC}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FileTransferServer", "FileTransferServer\FileTransferServer.csproj", "{9BF859EE-EF90-4B5B-8576-E26770F2F792}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -33,10 +39,22 @@ Global
{5CE51CC9-7884-4E21-9D68-2321CA14312E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5CE51CC9-7884-4E21-9D68-2321CA14312E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5CE51CC9-7884-4E21-9D68-2321CA14312E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F8B727E1-340D-4096-A784-E570AE13FABC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F8B727E1-340D-4096-A784-E570AE13FABC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F8B727E1-340D-4096-A784-E570AE13FABC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F8B727E1-340D-4096-A784-E570AE13FABC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9BF859EE-EF90-4B5B-8576-E26770F2F792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9BF859EE-EF90-4B5B-8576-E26770F2F792}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9BF859EE-EF90-4B5B-8576-E26770F2F792}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9BF859EE-EF90-4B5B-8576-E26770F2F792}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {F8B727E1-340D-4096-A784-E570AE13FABC} = {FC074553-5D9F-4DF1-9130-7092E37DE768}
+ {9BF859EE-EF90-4B5B-8576-E26770F2F792} = {FC074553-5D9F-4DF1-9130-7092E37DE768}
+ EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A65DB16F-877D-4586-A9F3-8BBBFBAF5CEB}
EndGlobalSection
diff --git a/ZeroLevel/Services/Network/FileTransfer/FileClient.cs b/ZeroLevel/Services/Network/FileTransfer/FileClient.cs
index cd57903..c640686 100644
--- a/ZeroLevel/Services/Network/FileTransfer/FileClient.cs
+++ b/ZeroLevel/Services/Network/FileTransfer/FileClient.cs
@@ -20,6 +20,10 @@ namespace ZeroLevel.Services.Network.FileTransfer
_baseFolder = baseFolder ?? throw new Exception(nameof(baseFolder));
_nameMapper = nameMapper ?? throw new Exception(nameof(nameMapper));
_disposeClient = disposeClient;
+
+ _client.RegisterInbox("__upload_file_start", (f, _, __) => Receiver.Incoming(f, nameMapper(_client)));
+ _client.RegisterInbox("__upload_file_frame", (f, _, __) => Receiver.Incoming(f));
+ _client.RegisterInbox("__upload_file_complete", (f, _, __) => Receiver.Incoming(f));
}
public void Dispose()
@@ -39,7 +43,6 @@ namespace ZeroLevel.Services.Network.FileTransfer
{
Log.Info($"Start upload file {reader.Path}");
var startinfo = reader.GetStartInfo();
- startinfo.FilePath = Path.GetFileName(startinfo.FilePath);
_client.Send("__upload_file_start", startinfo);
foreach (var chunk in reader.Read())
{
diff --git a/ZeroLevel/Services/Network/FileTransfer/FileServer.cs b/ZeroLevel/Services/Network/FileTransfer/FileServer.cs
index d4f0183..bf6a56a 100644
--- a/ZeroLevel/Services/Network/FileTransfer/FileServer.cs
+++ b/ZeroLevel/Services/Network/FileTransfer/FileServer.cs
@@ -20,6 +20,10 @@ namespace ZeroLevel.Services.Network.FileTransfer
_baseFolder = baseFolder ?? throw new Exception(nameof(baseFolder));
_nameMapper = nameMapper ?? throw new Exception(nameof(nameMapper));
_disposeService = disposeService;
+
+ _service.RegisterInbox("__upload_file_start", (f, _, client) => Receiver.Incoming(f, nameMapper(client)));
+ _service.RegisterInbox("__upload_file_frame", (f, _, __) => Receiver.Incoming(f));
+ _service.RegisterInbox("__upload_file_complete", (f, _, __) => Receiver.Incoming(f));
}
public void Dispose()