question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

My nightmare returns...

See original GitHub issue

Hello. It would appear that I’m doing something wrong (Once more) I believe that the client gets disposed at some point after receiving a long byte[] from remote connections… I have checked with the client.test and server.test those work perfectly fine. I’m just doing something wrong in my own implementation of the package… How can I move the client and the server networking to a separate class and instantiate it ?(You talked to me about this before) Do I need to use the { get; set; } ? This issue has me really confused, I’m sure that my router network works fine, I’m just doing something wrong in the code… It used to work fine for small byte[] but when I try to send a .wav file for example it just disposes itself or something like that… I get the following error: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.

Edit: Here are the full errors in both exception and .json formats. [ERROR] System.IO.IOException: Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size) --- End of inner exception stack trace --- at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size) at WatsonTcp.WatsonTcpServer.SendDataStream(ClientMetadata client, Int64 contentLength, Stream stream) at WatsonTcp.WatsonTcpServer.SendInternal(ClientMetadata client, WatsonMessage msg, Int64 contentLength, Stream stream)

"ClassName": "System.IO.IOException", "Message": "Unable to write data to the transport connection: An existing connection was forcibly closed by the remote host.", "Data": null, "InnerException": { "NativeErrorCode": 10054, "ClassName": "System.Net.Sockets.SocketException", "Message": "An existing connection was forcibly closed by the remote host", "Data": null, "InnerException": null, "HelpURL": null, "StackTraceString": " at System.Net.Sockets.Socket.Send(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)\r\n at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "ExceptionMethod": "8\nSend\nSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Net.Sockets.Socket\nInt32 Send(Byte[], Int32, Int32, System.Net.Sockets.SocketFlags)", "HResult": -2147467259, "Source": "System", "WatsonBuckets": null }, "HelpURL": null, "StackTraceString": " at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)\r\n at WatsonTcp.WatsonTcpServer.SendDataStream(ClientMetadata client, Int64 contentLength, Stream stream)\r\n at WatsonTcp.WatsonTcpServer.SendInternal(ClientMetadata client, WatsonMessage msg, Int64 contentLength, Stream stream)", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "ExceptionMethod": "8\nWrite\nSystem, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089\nSystem.Net.Sockets.NetworkStream\nVoid Write(Byte[], Int32, Int32)", "HResult": -2146232800, "Source": "System", "WatsonBuckets": null

Edit2: These errors specifically happen when sending large byte[] with the Server.Send(IpPort, byte[]) method

Edit3: I looked a bit more into it, I believe that this could be caused by “IpPort” mismatches, like, the server sends data to a port the client doesn’t expect to receive them from? I noticed that more ports than the one initially set up as the actual port to use are being used to send/receive data

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Antwnscommented, Nov 13, 2020

I’m sorry but the newest version completely bricked my app… I moved on to a different package and cross-network communication works too. I’m sorry @jchristn , I waited ~4 days I understand you had alot to work with and that’s okay

1reaction
jchristncommented, Nov 10, 2020

Hi @Antwns if you invite me to your repo, I’ll be happy to clone, take a look, and contribute recommendations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Nightmare Returns
The Nightmare Returns is a live concert video of Alice Cooper. The Nightmare Returns. Video by. Alice Cooper. Released, 1987 VHS Betamax Aug...
Read more >
Alice Cooper: The Nightmare Returns (Video 1989)
Alice Cooper: The Nightmare Returns: Directed by Marty Callner. With Alice Cooper, Kane Roberts, Kip Winger, Devlin 7. The concert was filmed live...
Read more >
The Nightmare Returns : Alice Cooper: Digital Music
The Nightmare Returns. Alice Cooper. 17 SONGS • 1 HOUR AND 13 MINUTES • JAN 01 1987. Play. Purchase Options. 1. Welcome To...
Read more >
The Nightmare Returns - Alice Cooper
Capturing all the energy from his Detroit concert in 1986, The Nightmare Returns is a spectacular showcase of entertaining thrills.
Read more >
Alice Cooper – The Nightmare Returns Lyrics
The Nightmare Returns Lyrics: I'm a little tired and feeling hazy / I just need to rest my eyes / But I won't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found