each other using sockets. The current implementation is wired ethernet
and a crossover cable (2 seperate PCs).
I need to migrate this to a Wireless Ad-hoc network connection.
I have successfully established an ad-hoc wireless connection.
I'm a little unclear as to how to progress...
In the wired implementaion I simply used a static IP address for
each of the two computers and I'm able to connect using those.
In this implementation I cannot be certain that a static IP is unique
to my
two machines.
How can I establish a socket connection to my other PC without knowing
it's
IP address?
I guess I could use static IPs and build in the security into the Ad-
Hoc connection itself
so that only my two machines can be members...
Any suggestions appreciated!
Thanks
Mark
> [...]
> In this implementation I cannot be certain that a static IP is unique to
> my
> two machines.
>
> How can I establish a socket connection to my other PC without knowing
> it's
> IP address?
Hard to say without more specifics. But, if the two computers are on the
same LAN, you may be able to use the LAN's name service functionality to
get the IP address. E.g. call gethostbyname() which, depending on the LAN
configuration, may provide that information.
In the end, you have to have _some_ mechanism for discovering the network
address.
Pete