25#ifndef SFML_SOCKET_HPP
26#define SFML_SOCKET_HPP
NonCopyable()
Default constructor.
Multiplexer that allows to read from multiple sockets.
void setBlocking(bool blocking)
Set the blocking state of the socket.
friend class SocketSelector
Status
Status codes that may be returned by socket functions.
@ Partial
The socket sent a part of the data.
@ Error
An unexpected error happened.
@ 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.
@ AnyPort
Special value that tells the system to pick any available port.
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.