fix for displaying things on vr scene
This commit is contained in:
@@ -9,6 +9,8 @@ namespace RH_Engine
|
||||
|
||||
public class ServerResponseReader
|
||||
{
|
||||
private bool running;
|
||||
private Thread t;
|
||||
public OnResponse callback
|
||||
{
|
||||
get; set;
|
||||
@@ -23,7 +25,7 @@ namespace RH_Engine
|
||||
|
||||
public void StartRead()
|
||||
{
|
||||
Thread t = new Thread(() =>
|
||||
t = new Thread(() =>
|
||||
{
|
||||
if (this.callback == null)
|
||||
{
|
||||
@@ -31,8 +33,9 @@ namespace RH_Engine
|
||||
}
|
||||
else
|
||||
{
|
||||
running = true;
|
||||
Console.WriteLine("[SERVERRESPONSEREADER] Starting loop for reading");
|
||||
while (true)
|
||||
while (running)
|
||||
{
|
||||
string res = ReadPrefMessage(Stream);
|
||||
//Console.WriteLine("[SERVERRESPONSEREADER] got message from server: " + res);
|
||||
@@ -44,6 +47,13 @@ namespace RH_Engine
|
||||
t.Start();
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
running = false;
|
||||
t.Join();
|
||||
Stream.Close();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// reads a response from the server
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user