4 changed files with 114 additions and 0 deletions
-
40PixelHub-Client-Test/PixelHub-Client-Test/PixelHub-Client-Test.csproj
-
33PixelHub-Client-Test/PixelHub-Client-Test/PixelHubClient.cs
-
15PixelHub-Client-Test/PixelHub-Client-Test/Program.cs
-
26PixelHub-Client-Test/PixelHub-Client-Test/Properties/AssemblyInfo.cs
@ -0,0 +1,40 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> |
|||
<ProjectGuid>{1D99DDDB-9457-4B8D-83B8-06663554F4C4}</ProjectGuid> |
|||
<OutputType>Exe</OutputType> |
|||
<RootNamespace>PixelHubClientTest</RootNamespace> |
|||
<AssemblyName>PixelHubClientTest</AssemblyName> |
|||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug</OutputPath> |
|||
<DefineConstants>DEBUG;</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<ExternalConsole>true</ExternalConsole> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release</OutputPath> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<ExternalConsole>true</ExternalConsole> |
|||
<PlatformTarget>x86</PlatformTarget> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="System" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Program.cs" /> |
|||
<Compile Include="Properties\AssemblyInfo.cs" /> |
|||
<Compile Include="PixelHubClient.cs" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|||
</Project> |
@ -0,0 +1,33 @@ |
|||
using System; |
|||
using System.Net.Sockets; |
|||
using System.Net; |
|||
using System.IO; |
|||
namespace PixelHubClientTest |
|||
{ |
|||
public class PixelHubClient |
|||
{ |
|||
TcpClient client; |
|||
|
|||
StreamReader incoming; |
|||
StreamWriter outgoing; |
|||
|
|||
public PixelHubClient () |
|||
{ |
|||
} |
|||
|
|||
public void Connect (IPAddress destination, int port) |
|||
{ |
|||
client = new TcpClient(); |
|||
client.Connect(destination, port); |
|||
|
|||
incoming = new StreamReader(client.GetStream()); |
|||
outgoing = new StreamWriter(client.GetStream()) { AutoFlush = true }; |
|||
} |
|||
|
|||
public void Test () |
|||
{ |
|||
outgoing.WriteLine("Testing!"); |
|||
Console.WriteLine("> {0}", incoming.ReadLine()); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,15 @@ |
|||
using System; |
|||
using System.Net; |
|||
|
|||
namespace PixelHubClientTest |
|||
{ |
|||
class MainClass |
|||
{ |
|||
public static void Main (string[] args) |
|||
{ |
|||
PixelHubClient pixelClient = new PixelHubClient(); |
|||
pixelClient.Connect(IPAddress.Parse("10.42.0.1"), 5050); |
|||
pixelClient.Test(); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,26 @@ |
|||
using System.Reflection; |
|||
using System.Runtime.CompilerServices; |
|||
|
|||
// Information about this assembly is defined by the following attributes.
|
|||
// Change them to the values specific to your project.
|
|||
|
|||
[assembly: AssemblyTitle("PixelHubClientTest")] |
|||
[assembly: AssemblyDescription("")] |
|||
[assembly: AssemblyConfiguration("")] |
|||
[assembly: AssemblyCompany("")] |
|||
[assembly: AssemblyProduct("")] |
|||
[assembly: AssemblyCopyright("Starbeamrainbowlabs")] |
|||
[assembly: AssemblyTrademark("")] |
|||
[assembly: AssemblyCulture("")] |
|||
|
|||
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
|
|||
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
|
|||
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
|
|||
|
|||
[assembly: AssemblyVersion("1.0.*")] |
|||
|
|||
// The following attributes are used to specify the signing key for the assembly,
|
|||
// if desired. See the Mono documentation for more information about signing.
|
|||
|
|||
//[assembly: AssemblyDelaySign(false)]
|
|||
//[assembly: AssemblyKeyFile("")]
|
Reference in new issue