5#include <EasySockets/Api/SocketTypes.hpp>
6#include <EasySockets/Api/Addresses.hpp>
7#include <EasySockets/Api/Documentation.hpp>
27 ES_API_DOC(socket_constructor)
45 ES_API_DOC(socket_bind_to)
54 ES_API_DOC(socket_connect_to)
61 ES_API_DOC(socket_listen_for_connections)
73 ES_API_DOC(socket_accept_connection)
82 ES_API_DOC(socket_receive_data)
92 ES_API_DOC(socket_receive_data_from)
104 ES_API_DOC(socket_send_data)
112 int64_t
send_data(
const char* buffer,
int buffer_size);
114 ES_API_DOC(socket_send_data_to)
138 addrinfo* resolve_address(
const EndPoint& end_point,
int flags);
141 WinsockData m_winsock_data;
An object which represents a connection between two applications.
Definition WindowsSocket.hpp:25
int64_t receive_data(char *buffer, int buffer_size)
Waits to receive data from the connected end point.
Definition WindowsSocket.cpp:148
WindowsSocket(const WindowsSocket &)=delete
WindowsSocket(IpVersion ip_version, Protocol protocol)
Constructor for Socket.
Definition WindowsSocket.cpp:26
int64_t receive_data_from(char *buffer, int buffer_size, EndPoint &sender_end_point)
Waits to receive data from any endpoint.
Definition WindowsSocket.cpp:158
void listen_for_connections(int backlog)
Makes the socket start listening for incoming connections.
Definition WindowsSocket.cpp:126
WindowsSocket & operator=(const WindowsSocket &)=delete
int64_t send_data(const char *buffer, int buffer_size)
Sends data to the connected end point.
Definition WindowsSocket.cpp:190
WindowsSocket accept_connection()
Accepts incoming connections.
Definition WindowsSocket.cpp:134
void connect_to(const EndPoint &end_point)
Connects a socket to the given end point.
Definition WindowsSocket.cpp:105
int64_t send_data_to(const char *buffer, int buffer_size, const EndPoint &end_point)
Sends data to the provided end point.
Definition WindowsSocket.cpp:200
void bind_to(const EndPoint &end_point)
Binds a socket to the given end point.
Definition WindowsSocket.cpp:84
Definition Addresses.hpp:7
Represents the address + port that identifies a connection. Initialized by {Address,...
Definition Addresses.hpp:29