Comments (5)
private void PrintServeLog(string msg)
{
try
{
if (uiListBoxServe.Items.Count > 1000)
{
if (uiListBoxServe.InvokeRequired)
{
uiListBoxServe.BeginInvoke(new Action(() => uiListBoxServe.Items.Clear()));
}
else
{
uiListBoxServe.Items.Clear();
}
}
if (uiListBoxServe.InvokeRequired)
{
uiListBoxServe.BeginInvoke(new Action(() => uiListBoxServe.Items.Insert(0, msg)));
}
else
{
uiListBoxServe.Items.Insert(0, msg);
}
}
catch (Exception ex)
{
if (uiListBoxServe.InvokeRequired)
{
uiListBoxServe.BeginInvoke(new Action(() => uiListBoxServe.Items.Insert(0, "错误:" + ex.Message)));
}
else
{
uiListBoxServe.Items.Insert(0, "错误:" + ex.Message);
}
}
}
I tried using this method so that the UI doesn't respond to the problem solving, but _Server doesn't stop, but instead returns an error like this: System Net Sockets SocketException (995): I/O operation aborted due to thread exit or application request.
from supersimpletcp.
Unless I add to Task AcceptConnections(). ||ex is SocketException no longer gives the error message, but I'm not sure if that's right.
from supersimpletcp.
Hi @FreeVB thanks for your note. I'm sorry but I'm not fully understanding what the issue is that you are encountering. Could you try to describe it again?
from supersimpletcp.
Set PrintServeLog to _Server.Logger=PrintServeLog; , the service cannot be stopped. Or an error message appears.
from supersimpletcp.
@FreeVB Hi, this seems like an issue caused by the implementation using forms. Were you able to resolve it? Can you identify where it hangs, or, supply the error message that appears?
from supersimpletcp.
Related Issues (20)
- Message Framing Question HOT 1
- Send(); fails on Windows 8/8.1 HOT 2
- SimpleTcpServer DataReceived method spawns a new task for each DataReceived event HOT 3
- receive data not fast after connect HOT 1
- Server.IsListening wrong behavior when MaxConnections reached HOT 1
- Client connection is lost with no obvious reason HOT 10
- how to include dll file in exe file to be a one exe file ?? HOT 1
- NoDelay option for listener HOT 1
- KeepAliveSettings for server are applied in seconds on connecting client instead of ms HOT 1
- An active client with keep alive that does not process incoming message leads memory buildup in the server HOT 1
- What metadata is being embeded when the data is send in chunks? HOT 1
- SimpleTcpClient.Events.Disconnected is not triggered when SimpleTcpServer.Close() is invoked. HOT 1
- Block Unwanted Participants HOT 1
- multiple IP address HOT 2
- Keep Alive in linux container HOT 1
- The server sends messages to all clients on a regular basis HOT 2
- The client connecting to the Server on Maui is immediately kicked out. HOT 17
- supersimpletcp is missing NuGet package README file
- Why doesn't Dispose call Stop? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supersimpletcp.