Починин Socket

This commit is contained in:
2025-03-31 20:09:45 +03:00
committed by sasklyarov
parent d5e4c08527
commit 215236fa15
3 changed files with 41 additions and 23 deletions

View File

@ -81,7 +81,8 @@ namespace DroneSimulator
od.PosX= drone.PosXYZ.X; od.PosY = drone.PosXYZ.Y;
od.LaserRange = drone.LaserRange;
data.Client.Send(od.getBytes());
try { data.Client.Send(od.getBytes()); }
catch { }
}
private void button_Client_Start_Click(object sender, EventArgs e)
@ -102,6 +103,7 @@ namespace DroneSimulator
}
case NetServerClients.ServerState.Stop:
{
label_Clients_Num.Text = "0";
button_Client_Start.Text = "Start";
button_Client_Start.BackColor = Color.Transparent;
break;