diff --git a/OpenRA.Server/Class1.cs b/OpenRA.Server/Class1.cs new file mode 100644 index 0000000000..dab8fd96c3 --- /dev/null +++ b/OpenRA.Server/Class1.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Net.Sockets; +using System.Threading; + +namespace OpenRA.Server +{ + class Program + { + static void Main(string[] args) + { + var left = new TcpListener(1234); + left.Start(); + var right = new TcpListener(1235); + right.Start(); + + var l = left.AcceptTcpClient().GetStream(); + var r = right.AcceptTcpClient().GetStream(); + + var ll = new Thread(RW(l, r)); + var rr = new Thread(RW(r, l)); + ll.Start(); + rr.Start(); + + ll.Join(); + } + + static ThreadStart RW(NetworkStream a, NetworkStream b) + { + return () => + { + var buf = new byte[4096]; + while (true) + { + var len = a.Read(buf, 0, 4096); + b.Write(buf, 0, len); + } + }; + } + } +} diff --git a/OpenRA.Server/OpenRA.Server.csproj b/OpenRA.Server/OpenRA.Server.csproj new file mode 100644 index 0000000000..6a801965b0 --- /dev/null +++ b/OpenRA.Server/OpenRA.Server.csproj @@ -0,0 +1,62 @@ + + + + Debug + AnyCPU + 9.0.30729 + 2.0 + {76F621A1-3D8E-4A99-9F7E-B071EB657817} + Exe + Properties + OpenRA.Server + OpenRA.Server + v3.5 + 512 + + + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + 3.5 + + + 3.5 + + + 3.5 + + + + + + + + + + + \ No newline at end of file diff --git a/OpenRA.Server/Properties/AssemblyInfo.cs b/OpenRA.Server/Properties/AssemblyInfo.cs new file mode 100644 index 0000000000..8654a6d4e1 --- /dev/null +++ b/OpenRA.Server/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 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("OpenRA.Server")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("OpenRA.Server")] +[assembly: AssemblyCopyright("Copyright © 2009")] +[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)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("09d30fc4-df3f-4f6a-b9bd-1819c2a23c62")] + +// 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/OpenRa.sln b/OpenRa.sln index 08bb83d35f..2d8e00e87b 100644 --- a/OpenRa.sln +++ b/OpenRa.sln @@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PaletteMatch", "PaletteMatc EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SequenceEditor", "SequenceEditor\SequenceEditor.csproj", "{230F65CE-A6DE-4235-8B38-13A3D606C7F7}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Server", "OpenRA.Server\OpenRA.Server.csproj", "{76F621A1-3D8E-4A99-9F7E-B071EB657817}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug (x86)|Any CPU = Debug (x86)|Any CPU @@ -135,6 +137,27 @@ Global {230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Mixed Platforms.ActiveCfg = Release|x86 {230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Mixed Platforms.Build.0 = Release|x86 {230F65CE-A6DE-4235-8B38-13A3D606C7F7}.Release|Win32.ActiveCfg = Release|x86 + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug (x86)|Any CPU.ActiveCfg = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug (x86)|Any CPU.Build.0 = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug (x86)|Mixed Platforms.ActiveCfg = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug (x86)|Mixed Platforms.Build.0 = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug (x86)|Win32.ActiveCfg = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug (x86)|Win32.Build.0 = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug|Any CPU.Build.0 = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Debug|Win32.ActiveCfg = Debug|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release (x86)|Any CPU.ActiveCfg = Release|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release (x86)|Any CPU.Build.0 = Release|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release (x86)|Mixed Platforms.ActiveCfg = Release|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release (x86)|Mixed Platforms.Build.0 = Release|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release (x86)|Win32.ActiveCfg = Release|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release|Any CPU.ActiveCfg = Release|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release|Any CPU.Build.0 = Release|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {76F621A1-3D8E-4A99-9F7E-B071EB657817}.Release|Win32.ActiveCfg = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE