7 #ifndef NAZARA_ABSTRACTSOCKET_HPP 8 #define NAZARA_ABSTRACTSOCKET_HPP 10 #include <Nazara/Prerequesites.hpp> 11 #include <Nazara/Core/Signal.hpp> 12 #include <Nazara/Network/Config.hpp> 13 #include <Nazara/Network/Enums.hpp> 14 #include <Nazara/Network/SocketHandle.hpp> 27 void EnableBlocking(
bool blocking);
29 inline SocketError GetLastError()
const;
30 inline SocketHandle GetNativeHandle()
const;
31 inline SocketState GetState()
const;
32 inline SocketType GetType()
const;
34 inline bool IsBlockingEnabled()
const;
36 std::size_t QueryAvailableBytes()
const;
37 std::size_t QueryReceiveBufferSize()
const;
38 std::size_t QuerySendBufferSize()
const;
40 void SetReceiveBufferSize(std::size_t size);
41 void SetSendBufferSize(std::size_t size);
52 virtual void OnClose();
53 virtual void OnOpened();
55 bool Open(NetProtocol protocol);
56 void Open(SocketHandle existingHandle);
58 inline void UpdateState(SocketState newState);
60 NetProtocol m_protocol;
61 SocketError m_lastError;
62 SocketHandle m_handle;
65 bool m_isBlockingEnabled;
69 #include <Nazara/Network/AbstractSocket.inl> 71 #endif // NAZARA_ABSTRACTSOCKET_HPP TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Network class that represents the base of socket.
Definition: AbstractSocket.hpp:18