Browse Source

Changed parameter for SocketAddress:setAddress(char const *).

adeniz_1
Alban Deniz 4 years ago
parent
commit
c6381d51ae
2 changed files with 2 additions and 2 deletions
  1. 1
    1
      networking.hpp
  2. 1
    1
      networking.inline.hpp

+ 1
- 1
networking.hpp View File

socklen_t getAddressSize(); // How big is that structure anyway? socklen_t getAddressSize(); // How big is that structure anyway?


void setAddress(unsigned long ipAddress); // Set the IP address from an unsigned int void setAddress(unsigned long ipAddress); // Set the IP address from an unsigned int
void setAddress(char* ipString); // Set the IP address from a cstring
void setAddress(char const * ipString); // Set the IP address from a cstring
unsigned long getAddress(); // Get the IP address as an unsigned int unsigned long getAddress(); // Get the IP address as an unsigned int
const char* getAddress(char* str); // Get the IP address into a cstring const char* getAddress(char* str); // Get the IP address into a cstring
void getAddress(int& a0, int& a1, int& a2, int& a3); // Get the IP address into 4 ints void getAddress(int& a0, int& a1, int& a2, int& a3); // Get the IP address into 4 ints

+ 1
- 1
networking.inline.hpp View File

Address.sin_addr.s_addr = htonl(ipAddress); // Convert to network order and assign. Address.sin_addr.s_addr = htonl(ipAddress); // Convert to network order and assign.
} }


inline void SocketAddress::setAddress(char* ipString) { // Set the IP address from a cstring
inline void SocketAddress::setAddress(char const * ipString) { // Set the IP address from a cstring
Address.sin_addr.s_addr = inet_addr(ipString); // Convert to number and assign. Address.sin_addr.s_addr = inet_addr(ipString); // Convert to number and assign.
} }



Loading…
Cancel
Save