Woman, Life, Freedom


Async BSD Sockets Library
Library protected and public interface header documentation
AsyncBsdSocketLib::NetworkSocket Class Reference

TCP/IP network socket. More...

#include <network_socket.h>

Inheritance diagram for AsyncBsdSocketLib::NetworkSocket:
AsyncBsdSocketLib::Communicator AsyncBsdSocketLib::TcpClient AsyncBsdSocketLib::TcpListener AsyncBsdSocketLib::UdpClient

Protected Member Functions

 NetworkSocket (std::string ipAddress, uint16_t port)
 Constructor. More...
 

Protected Attributes

const std::string IpAddress
 Listening/Connecting IP address for server/client.
 
const uint16_t Port
 Listening/Connecting port number for server/client.
 
- Protected Attributes inherited from AsyncBsdSocketLib::Communicator
int FileDescriptor
 File descriptor.
 

Additional Inherited Members

- Public Member Functions inherited from AsyncBsdSocketLib::Communicator
int Descriptor () const noexcept
 File descriptor. More...
 
virtual int Connection () const noexcept=0
 Connection descriptor for sending and receiving. More...
 
virtual bool TrySetup () noexcept=0
 Try to setup the communicator. More...
 
virtual bool TryClose () noexcept
 Try to close the communicator. More...
 

Detailed Description

TCP/IP network socket.

Constructor & Destructor Documentation

◆ NetworkSocket()

AsyncBsdSocketLib::NetworkSocket::NetworkSocket ( std::string  ipAddress,
uint16_t  port 
)
protected

Constructor.

Parameters
ipAddressBinding IPv4 address
portBinding port number