1#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__) || defined (_WIN64)
3#ifndef TENDUKE_OSA_WIN_WINDOWSSOCKET_H
4#define TENDUKE_OSA_WIN_WINDOWSSOCKET_H
6#include "../AbstractBaseSocket.h"
8namespace tenduke {
namespace osa {
namespace win {
10class WindowsSocket :
public ::tenduke::osa::AbstractBaseSocket<SOCKET>
13 ~WindowsSocket()
override;
24 explicit WindowsSocket(SOCKET descriptor);
31 std::unique_ptr<Socket> accept()
override;
32 using ::tenduke::osa::AbstractBaseSocket<SOCKET>::accept;
37 void bind(std::uint32_t ipAddress, std::uint16_t port)
override;
42 std::uint16_t getPort()
const override;
47 void setNonBlocking()
override;
53 bool hasIncomingConnections(std::uint32_t timeoutMs)
const override;
58 int getLastError()
const override;
63 std::string mkErrorMessage(
const std::string &body,
int errorCode)
const override;
68 bool wouldBlock(
int errorCode)
const override;
Operating system abstraction.
Definition win32_utils.h:7
Root for classes, functions and globals of 10Duke C++ Client.
Definition APIRequest.h:4