diff options
| author | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-06-24 15:56:36 +0000 |
|---|---|---|
| committer | oroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e> | 2008-06-24 15:56:36 +0000 |
| commit | 826a768318d071200b289ed3a93ee409759dbae3 (patch) | |
| tree | 3b3ade45833382db74ab0cb33d8d4327da672bfc /src/net_multiplayer.c | |
| parent | 13064d1bfc0459be37d8229f3f8c037fb8a10b8f (diff) | |
- podpora IPv6
- game server je schopny obsluhovat clientov zo sieti IPv4 a IPv6 sucastne
- hrac si moze zvolit v nastaveniach, ci che pouzivat IPv4 alebo IPv6
- odkolnenie od SDL_net ( nepodporuje IPv6 ) // ale v kode este podpora SDL_Net je
git-svn-id: http://opensvn.csie.org/tuxanci_ng@70 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/net_multiplayer.c')
| -rw-r--r-- | src/net_multiplayer.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/net_multiplayer.c b/src/net_multiplayer.c index 92e9504..a9132e3 100644 --- a/src/net_multiplayer.c +++ b/src/net_multiplayer.c @@ -31,7 +31,16 @@ int getNetTypeGame() return netGameType; } -int initNetMuliplayer(int type, char *ip, int port) +#ifdef PUBLIC_SERVER + +int initNetMulitplayerPublicServer(char *ip4, int port4, char *ip6, int port6) +{ + netGameType = NET_GAME_TYPE_SERVER; + return initUdpPublicServer(ip4, port4, ip6, port6); +} +#endif + +int initNetMuliplayer(int type, char *ip, int port, int proto) { netGameType = type; @@ -42,7 +51,7 @@ int initNetMuliplayer(int type, char *ip, int port) case NET_GAME_TYPE_SERVER : #ifdef SUPPORT_NET_UNIX_UDP - if( initUdpServer(ip, port) != 0 ) + if( initUdpServer(ip, port, proto) != 0 ) { fprintf(stderr, "Neomzem inicalizovat sietovu hru pre server !\n"); netGameType = NET_GAME_TYPE_NONE; @@ -62,7 +71,7 @@ int initNetMuliplayer(int type, char *ip, int port) #ifndef PUBLIC_SERVER case NET_GAME_TYPE_CLIENT : #ifdef SUPPORT_NET_UNIX_UDP - if( initUdpClient(ip, port) != 0 ) + if( initUdpClient(ip, port, proto) != 0 ) { fprintf(stderr, "Neomzem inicalizovat sietovu hru pre clienta !\n"); netGameType = NET_GAME_TYPE_NONE; |