mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 05:23:04 +01:00
Start implementing TCP API
This commit is contained in:
@@ -34,6 +34,9 @@
|
||||
#ifndef SHUT_RD
|
||||
#define SHUT_RD SD_RECEIVE
|
||||
#endif
|
||||
#ifndef SHUT_WR
|
||||
#define SHUT_WR SD_SEND
|
||||
#endif
|
||||
#ifndef SHUT_RDWR
|
||||
#define SHUT_RDWR SD_BOTH
|
||||
#endif
|
||||
@@ -464,6 +467,14 @@ public:
|
||||
thread.detach();
|
||||
}
|
||||
|
||||
void Finish() override
|
||||
{
|
||||
if (_status == SOCKET_STATUS_CONNECTED)
|
||||
{
|
||||
shutdown(_socket, SHUT_WR);
|
||||
}
|
||||
}
|
||||
|
||||
void Disconnect() override
|
||||
{
|
||||
if (_status == SOCKET_STATUS_CONNECTED)
|
||||
@@ -844,6 +855,7 @@ void DisposeWSA()
|
||||
|
||||
std::unique_ptr<ITcpSocket> CreateTcpSocket()
|
||||
{
|
||||
InitialiseWSA();
|
||||
return std::make_unique<TcpSocket>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user