Loading...
Searching...
No Matches
TcpSocket.hpp
Go to the documentation of this file.
7// In no event will the authors be held liable for any damages arising from the use of this software.
164 [[nodiscard]] Status connect(IpAddress remoteAddress, unsigned short remotePort, Time timeout = Time::Zero);
342 TlsStatus setupTlsClient(const sf::String& hostname, const std::byte* certificateChainData, std::size_t certificateChainSize);
Utility class to build blocks of data to transfer over the network.
Definition Packet.hpp:49
Utility string class that automatically handles conversions between types and encodings.
Definition String.hpp:91
TlsStatus setupTlsClient(const sf::String &hostname, bool verifyPeer=true)
Set up transport layer security as a client.
Status send(const void *data, std::size_t size, std::size_t &sent)
Send raw data to the remote peer.
std::optional< IpAddress > getRemoteAddress() const
Get the address of the connected peer.
Status connect(IpAddress remoteAddress, unsigned short remotePort, Time timeout=Time::Zero)
Connect the socket to a remote peer.
TlsStatus setupTlsServer(const std::byte *certificateChainData, std::size_t certificateChainSize, const std::byte *privateKeyData, std::size_t privateKeySize, const std::byte *privateKeyPasswordData, std::size_t privateKeyPasswordSize)
Set up transport layer security as a server.
Status receive(void *data, std::size_t size, std::size_t &received)
Receive raw data from the remote peer.
std::optional< std::string > getCurrentCiphersuiteName() const
Get the name of the TLS ciphersuite currently in use.
unsigned short getRemotePort() const
Get the port of the connected peer to which the socket is connected.
unsigned short getLocalPort() const
Get the port to which the socket is bound locally.
Status receive(Packet &packet)
Receive a formatted packet of data from the remote peer.
Definition AudioResource.hpp:36