WatsonTCP Client disconnects instantly.
See original GitHub issueSimilar to #62 but have followed instructions on that issue and still have the problem.
OS: Windows 10 LTS Screenshots:
Our code:
// Start the server:
public void Start(ushort port = 52512, string name = "My Server", string password = "", ushort maxplayers = 10)
{
Password = password;
MaxPlayers = maxplayers;
Port = port;
server = new WatsonTcpServer(null, Port);
server.ClientConnected += ClientConnected;
server.ClientDisconnected += ClientDisconnected;
server.MessageReceived += MessageReceived;
server.StreamReceived += StreamRecieved;
server.SyncRequestReceived = SyncRequestReceived;
server.Start();
Logging.Info($"[Server] Server started.");
Logging.Info("[Server] Load/Create ServerData");
serverdata = new ServerData(name);
}
// Connect to the server:
public void Connect(string ip, ushort port = 52512, string password = "", Helpers.UserRole userRole = Helpers.UserRole.Client)
{
client = new WatsonTcpClient(ip, port);
client.ServerConnected += ServerConnected;
client.ServerDisconnected += ServerDisconnected;
client.MessageReceived += MessageReceived;
client.SyncRequestReceived = SyncRequestReceived;
client.Start();
if (client.Connected)
Login(password);
else
Logging.Warn("[Client] Couldn't connect to the server!");
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
In this project the client will connect but then is immediately ...
Client is somehow being immediately disposed upon connect. There's no exception thrown and caught from within DataReceiver, so it must be a ...
Read more >WatsonTcp is the easiest way to build TCP-based clients ...
Disconnecting Idle Clients. If you wish to have WatsonTcpServer automatically disconnect clients that have been idle for a period of time, set WatsonTcpServer....
Read more >C# Tcp Server client Disconnecting problems
When a client disconnects and detected properly you can do all that is needed to make it work properly, like removing it from...
Read more >颜乾/WatsonTcp
Disconnecting Idle Clients. If you wish to have WatsonTcpServer automatically disconnect clients that have been idle for a period of time, set WatsonTcpServer....
Read more >Client disconnects immediately after connection to Node js ...
I am trying to get the client to connect to the server and maintain the connection without closure. This is all hosted in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It seems watsonTCP doesn’t support 3.5, a shit ton of errors showed up when I opened watsonTCP in 3.5 targeted environment.
No problem, we switched to Telepathy which has better Unity support.
Did you clone and retarget to .NET Framework 3.5?