25 #ifndef SFML_SOCKET_HPP
26 #define SFML_SOCKET_HPP
31 #include <SFML/Network/Export.hpp>
32 #include <SFML/Network/SocketHandle.hpp>
33 #include <SFML/System/NonCopyable.hpp>
177 SocketHandle m_socket;
184 #endif // SFML_SOCKET_HPP
Socket(Type type)
Default constructor.
virtual ~Socket()
Destructor.
Type
Types of protocols that the socket can use.
void create()
Create the internal representation of the socket.
@ NotReady
The socket is not ready to send / receive data yet.
@ Partial
The socket sent a part of the data.
void close()
Close the socket gracefully.
void create(SocketHandle handle)
Create the internal representation of the socket from a socket handle.
Status
Status codes that may be returned by socket functions.
SocketHandle getHandle() const
Return the internal handle of the socket.
void setBlocking(bool blocking)
Set the blocking state of the socket.
Utility class that makes any derived class non-copyable.
Base class for all the socket types.
@ Done
The socket has sent / received the data.
bool isBlocking() const
Tell whether the socket is in blocking or non-blocking mode.
Multiplexer that allows to read from multiple sockets.
@ Disconnected
The TCP socket has been disconnected.