Skip to content

Commit

Permalink
socket test
Browse files Browse the repository at this point in the history
  • Loading branch information
pifopi committed Jan 31, 2024
1 parent fc102d7 commit 44a39fa
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions RaidCrawler.WinForms/MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
using RaidCrawler.WinForms.SubForms;
using SysBot.Base;
using System.Diagnostics;
using System.Net;
using System.Net.Sockets;
using System.Text.Json;
using static RaidCrawler.Core.Structures.Offsets;

Expand Down Expand Up @@ -62,6 +64,8 @@ public partial class MainWindow : Form
private bool StopAdvances =>
!Config.EnableFilters || RaidFilters.Count == 0 || RaidFilters.All(x => !x.Enabled);

Thread backgroundThread;

Check warning on line 67 in RaidCrawler.WinForms/MainWindow.cs

View workflow job for this annotation

GitHub Actions / build

The field 'MainWindow.backgroundThread' is never used

Check warning on line 67 in RaidCrawler.WinForms/MainWindow.cs

View workflow job for this annotation

GitHub Actions / build

The field 'MainWindow.backgroundThread' is never used

public MainWindow()

Check warning on line 69 in RaidCrawler.WinForms/MainWindow.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'backgroundThread' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.

Check warning on line 69 in RaidCrawler.WinForms/MainWindow.cs

View workflow job for this annotation

GitHub Actions / build

Non-nullable field 'backgroundThread' must contain a non-null value when exiting constructor. Consider declaring the field as nullable.
{
Config = new ClientConfig();
Expand Down Expand Up @@ -137,6 +141,25 @@ public MainWindow()
USB_Port_TB.Visible = false;
USB_Port_label.Visible = false;
}

//backgroundThread = new Thread(async () =>
//{
// TcpListener server = new TcpListener(IPAddress.Parse("127.0.0.1"), 18069);
// server.Start();
// TcpClient client = await server.AcceptTcpClientAsync();
// NetworkStream stream = client.GetStream();
// BinaryReader reader = new BinaryReader(stream);
// BinaryWriter writer = new BinaryWriter(stream);

// while (true)
// {
// int inData = reader.ReadInt32();
// int outData = inData * 2;
// writer.Write(outData);
// writer.Flush();
// }
//});
//backgroundThread.Start();
}

private void UpdateStatus(string status)
Expand Down

0 comments on commit 44a39fa

Please sign in to comment.