diff options
author | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-06 12:11:50 +0000 |
---|---|---|
committer | FlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-01-06 12:11:50 +0000 |
commit | 250672ef201106afb563a2e3bbd79a4ab98d13cc (patch) | |
tree | 7501da76a93047c2dfb79bcb338c9379e4abb15a /src/common/socket.h | |
parent | f044795aa8967ff4d99c3579553474d6bab4bf90 (diff) | |
download | hercules-250672ef201106afb563a2e3bbd79a4ab98d13cc.tar.gz hercules-250672ef201106afb563a2e3bbd79a4ab98d13cc.tar.bz2 hercules-250672ef201106afb563a2e3bbd79a4ab98d13cc.tar.xz hercules-250672ef201106afb563a2e3bbd79a4ab98d13cc.zip |
- Now winsock 2 is required.
- Cleaned up do_close and socket_init a bit.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9621 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/socket.h')
-rw-r--r-- | src/common/socket.h | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/src/common/socket.h b/src/common/socket.h index cb1e1c15f..5d6fcff89 100644 --- a/src/common/socket.h +++ b/src/common/socket.h @@ -4,20 +4,21 @@ #ifndef _SOCKET_H_ #define _SOCKET_H_ -#include <stdio.h> +#include "../common/cbasetypes.h" -#ifdef __WIN32 -#define __USE_W32_SOCKETS -#include <windows.h> -typedef long in_addr_t; +#ifdef WIN32 + #define __USE_W32_SOCKETS + #include <windows.h> + typedef long in_addr_t; #else -#include <sys/types.h> -#include <sys/socket.h> -#include <netinet/in.h> + #include <sys/types.h> + #include <sys/socket.h> + #include <netinet/in.h> #endif + +#include <stdio.h> #include <time.h> #include "../common/malloc.h" -#include "cbasetypes.h" extern time_t last_tick; extern time_t stall_time; @@ -180,6 +181,8 @@ void set_defaultconsoleparse(int (*defaultparse)(char*)); //ip_str is a char[16] where the whole ip is stored in string notation (optional) in_addr_t resolve_hostbyname(char* hostname, unsigned char *ip, char *ip_str); -extern unsigned int addr_[16]; // ip addresses of local host (host byte order) -extern unsigned int naddr_; // # of ip addresses +int socket_getips(uint32 *ips, int max); + +extern uint32 addr_[16]; // ip addresses of local host (host byte order) +extern int naddr_; // # of ip addresses #endif // _SOCKET_H_ |