G
Groghz
Hello,
I try to make a push listener for PPC/SP.
On a desktop device, I would simply launch a thread with a TcpListener
and listen to incoming push notifications.
1/ But for a mobile phone, the device ip adress changes very often. Is
it possible to be notified (by an event) when the phone ip adress has
changed ?
Currently I poll the adress of the phone every few seconds to detect
these changes.
2/ I use a TcpListener in a thread that listens on the last detected ip
address on the phone. But when the ip changes, the TcpListener must
restart too. So the former TcpListener must be stopped and a new
TcpListener be created with the right adress. Is there a way to restart
a TcpListener with another adress without destroying it ? How can a
TcpListener be stopped when it's stuck on TcpListener.Accept for
example ?
Is using a TcpListener a bad idea ? Can it be achieve by using the
Socket class ?
thanks in advance
I try to make a push listener for PPC/SP.
On a desktop device, I would simply launch a thread with a TcpListener
and listen to incoming push notifications.
1/ But for a mobile phone, the device ip adress changes very often. Is
it possible to be notified (by an event) when the phone ip adress has
changed ?
Currently I poll the adress of the phone every few seconds to detect
these changes.
2/ I use a TcpListener in a thread that listens on the last detected ip
address on the phone. But when the ip changes, the TcpListener must
restart too. So the former TcpListener must be stopped and a new
TcpListener be created with the right adress. Is there a way to restart
a TcpListener with another adress without destroying it ? How can a
TcpListener be stopped when it's stuck on TcpListener.Accept for
example ?
Is using a TcpListener a bad idea ? Can it be achieve by using the
Socket class ?
thanks in advance