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;
Utility class that makes any derived class non-copyable.
Multiplexer that allows to read from multiple sockets.
Base class for all the socket types.
void setBlocking(bool blocking)
Set the blocking state of the socket.
Status
Status codes that may be returned by socket functions.
@ Partial
The socket sent a part of the data.
@ Done
The socket has sent / received the data.
@ NotReady
The socket is not ready to send / receive data yet.
@ Disconnected
The TCP socket has been disconnected.
Type
Types of protocols that the socket can use.
SocketHandle getHandle() const
Return the internal handle of the socket.
void close()
Close the socket gracefully.
virtual ~Socket()
Destructor.
Socket(Type type)
Default constructor.
void create()
Create the internal representation of the socket.
bool isBlocking() const
Tell whether the socket is in blocking or non-blocking mode.
void create(SocketHandle handle)
Create the internal representation of the socket from a socket handle.