[ENet-discuss] little trouble with enet_address_set_host on Windows

Olivier Delannoy olivier.delannoy at gmail.com
Wed Feb 17 01:43:04 PST 2010


As far as I understand it, it seems to me that in both case you need
the user to specify whether he want to run the client or the client
and the server. In case it runs both you then you know that the client
need to connect to localhost. You have to provide some kind of
mechanism so that the client specify the hostname of the server he
wants to connect to. So in a client only version of your application
you need to take the name of the server from a field in the UI a
command line parameter or anything. In case of a client & server
instance you just specify the client hostname to connect to as
localhost through your program.

I hope it helps.


On Tue, Feb 16, 2010 at 4:40 PM, Benoit Germain <bgermain at ubisoft.fr> wrote:
>> -----Message d'origine-----
>> De : enet-discuss-bounces at cubik.org [mailto:enet-discuss-
>> bounces at cubik.org] De la part de Olivier Delannoy
>> Envoyé : mardi 16 février 2010 16:49
>> À : Discussion of the ENet library
>> Objet : Re: [ENet-discuss] little trouble with enet_address_set_host on
>> Windows
>>
>> if you want to do a local connection you should try use "localhost" as
>> your target host I guess.
>>
>
> The problem is that I do this from a application that I share. When run on my PC only, it hosts both a client and a server. When run on another PC, it only has a client that connects to the server run by my instance. Therefore the application has to namely specify the PC it connects to. And since I don't want to run a special version on my PC, I want the same code to work in both situations.
>
> I just wanted to avoid a test where the instance running on my PC has to explicitly connect to localhost whereas other instances connect to a named host. That being said, causing the client to connect to "localhost" when the application hosts the server does fix the behaviour. But I don't like it.
> I just feel that, as much as it is possible, ENet behaviour shouldn't be affected by an unrelated device I have plugged on the PC that happens to posture as a network interface with a fancy address.
> _______________________________________________
> ENet-discuss mailing list
> ENet-discuss at cubik.org
> http://lists.cubik.org/mailman/listinfo/enet-discuss
>



-- 
Olivier Delannoy
Website: http://olivier.delannoy.dalfy.org/


More information about the ENet-discuss mailing list