frnetlib/include/frnetlib/SocketDescriptor.h
Fred Nicolson 322f53841b Removed SocketReactor. Switched SocketSelector implementation to EPOLL
Should result in better performance, although a Windows implementation is not yet ready.
2018-10-01 15:36:13 +01:00

33 lines
583 B
C++

//
// Created by fred.nicolson on 01/10/18.
//
#ifndef FRNETLIB_SOCKETDESCRIPTOR_H
#define FRNETLIB_SOCKETDESCRIPTOR_H
#include <stdint.h>
namespace fr
{
class SocketDescriptor
{
public:
/*!
* Checks to see if the socket is connected or not
*
* @return True if connected, false otherwise
*/
virtual bool connected() const noexcept = 0;
/*!
* Gets the underlying socket descriptor.
*
* @return The socket descriptor.
*/
virtual int32_t get_socket_descriptor() const noexcept = 0;
};
}
#endif //FRNETLIB_SOCKETDESCRIPTOR_H