-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
StreamSocket hangs when using SocketStream without calling shutdownSend #2384
Comments
Thank you. You helped me with hanging StreamCopier I was facing. I was doing something less demanding, interacting with HTTP server, so send the request and get the response is all I need, so shutdownSend() solves my issue. Seems for your case SocketStream is probably not the right thing to use. Sorry I have no real help except that there is a stackoverflow posting that suggests using DialogSocket class. |
I have also encountered this issue. A note in the header might be a decent intermediary step. |
This issue is stale because it has been open for 365 days with no activity. |
I have also encountered this issue when trying to send the contents of a file on the socket. |
Expected behavior
I want to use the StreamSocket with an SocketStream to send different Messages to a Server and get the Answers.
Actual behavior
If i use the Code shown under Steps to reproduce the problem the program hangs on the
copyStream
Function. Inside that it hangs on theread
function from the InputStream. The Code only works if i callsocket.shutdownSend()
. If I call that before thecopyStream
Function is called everything works. But I couldn't use the Socket again to send another Message to the Server.Is there a way to use the StreamSocket without calling shutdownSend on the Socket?
Steps to reproduce the problem
(please make this a SSCCE, if applicable and reasonable)
This causes the Programm to hang on the
copyStream
Function call.This Version gets me the Answer of the Server but i could not reuse the socket to send another Message because I had to close the Sending Part of it.
POCO version
1.9.0
Compiler and version
Visual Studio 2017
Operating system and version
Windows 10
Other relevant information
The text was updated successfully, but these errors were encountered: