discord-bot/libs/DPP-10.0.29/include/dpp/socket.h

31 lines
495 B
C++
Raw Permalink Normal View History

2024-02-22 16:09:56 -05:00
#pragma once
#ifndef _WIN32
#ifndef SOCKET
#define SOCKET int
#endif
#endif
namespace dpp
{
/**
* @brief Represents a socket file descriptor.
* This is used to ensure parity between windows and unix-like systems.
*/
typedef SOCKET socket;
} // namespace dpp
#ifndef SOCKET_ERROR
/**
* @brief Represents a socket in error state
*/
#define SOCKET_ERROR -1
#endif
#ifndef INVALID_SOCKET
/**
* @brief Represents a socket which is not yet assigned
*/
#define INVALID_SOCKET ~0
#endif