mirror of
https://github.com/moonlight-stream/moonlight-common-c.git
synced 2026-02-16 02:21:07 +00:00
Send TCP FIN after completion of our RTSP request
This allows servers to read until a FIN, just like we do on the client.
This commit is contained in:
@@ -15,6 +15,8 @@
|
|||||||
#define SetLastSocketError(x) WSASetLastError(x)
|
#define SetLastSocketError(x) WSASetLastError(x)
|
||||||
#define LastSocketError() WSAGetLastError()
|
#define LastSocketError() WSAGetLastError()
|
||||||
|
|
||||||
|
#define SHUT_RD SD_RECEIVE
|
||||||
|
#define SHUT_WR SD_SEND
|
||||||
#define SHUT_RDWR SD_BOTH
|
#define SHUT_RDWR SD_BOTH
|
||||||
|
|
||||||
#ifdef EAGAIN
|
#ifdef EAGAIN
|
||||||
|
|||||||
@@ -267,6 +267,9 @@ static bool transactRtspMessageTcp(PRTSP_MESSAGE request, PRTSP_MESSAGE response
|
|||||||
goto Exit;
|
goto Exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Notify the server that we're finished sending the request with a FIN
|
||||||
|
shutdown(sock, SHUT_WR);
|
||||||
|
|
||||||
// Read the response until the server closes the connection
|
// Read the response until the server closes the connection
|
||||||
offset = 0;
|
offset = 0;
|
||||||
responseBufferSize = 0;
|
responseBufferSize = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user