Przeglądaj źródła

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

adeniz_1
Alban Deniz 4 lat temu
rodzic
commit
c6381d51ae
2 zmienionych plików z 2 dodań i 2 usunięć
  1. 1
    1
      networking.hpp
  2. 1
    1
      networking.inline.hpp

+ 1
- 1
networking.hpp Wyświetl plik

@@ -235,7 +235,7 @@ class SocketAddress {
socklen_t getAddressSize(); // How big is that structure anyway?

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
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

+ 1
- 1
networking.inline.hpp Wyświetl plik

@@ -181,7 +181,7 @@ inline void SocketAddress::setAddress(unsigned long ipAddress) {
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.
}


Ładowanie…
Anuluj
Zapisz