connected engine to client
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Threading;
|
||||||
using ProftaakRH;
|
using ProftaakRH;
|
||||||
|
|
||||||
namespace Client
|
namespace Client
|
||||||
@@ -27,7 +28,12 @@ namespace Client
|
|||||||
this.client = new TcpClient();
|
this.client = new TcpClient();
|
||||||
this.connected = false;
|
this.connected = false;
|
||||||
client.BeginConnect(adress, port, new AsyncCallback(OnConnect), null);
|
client.BeginConnect(adress, port, new AsyncCallback(OnConnect), null);
|
||||||
|
initEngine();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initEngine()
|
||||||
|
{
|
||||||
engineConnection = EngineConnection.INSTANCE;
|
engineConnection = EngineConnection.INSTANCE;
|
||||||
engineConnection.Connect();
|
engineConnection.Connect();
|
||||||
|
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace Client
|
|||||||
|
|
||||||
// wait until we have a tunnel id
|
// wait until we have a tunnel id
|
||||||
while (tunnelId == string.Empty) { }
|
while (tunnelId == string.Empty) { }
|
||||||
Write("got tunnel id! sending commands...");
|
Write("got tunnel id! " + tunnelId);
|
||||||
|
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ namespace RH_Engine
|
|||||||
{
|
{
|
||||||
if (d.clientinfo.host == pc.host && d.clientinfo.user == pc.user)
|
if (d.clientinfo.host == pc.host && d.clientinfo.user == pc.user)
|
||||||
{
|
{
|
||||||
Console.WriteLine("connecting to {0}, on {1} with id {2}", pc.user, pc.host, d.id);
|
Console.WriteLine("[JSONPARSER] connecting to {0}, on {1} with id {2}", pc.user, pc.host, d.id);
|
||||||
return d.id;
|
return d.id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user