TIA
Harry
I think OpenNetCF also does the same.
Refer here too
http://groups.google.com/group/microsoft.public.dotnet.framework.compactframework/browse_thread/thread/273197f519fafb47/dc3234d9d6774388?lnk=gst&q=IcmpSendEcho#dc3234d9d6774388
ICMP will not work with ActiveSync, and if you want to validate with
IPAddress and a port number, try with this code
public static bool IsConnectionEstablished(IPAddress ipAddress, int
port)
{
bool connectStatus = false;
Socket m_ClientSocket = null;
try
{
IPEndPoint ipEndPoint = new IPEndPoint(ipAddress,
port);
m_ClientSocket = new
Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp);
m_ClientSocket.Connect(ipEndPoint);
connectStatus = m_ClientSocket.Connected;
}
return connectStatus;
}
Hope this helps,
Cheers,
Arun.
Thanks for the links....is there anything in CF to do this? These look like
CE functions - any managed code for this or wrapped code?
Guess I really just need to see if the printer is available - it'd look like
a network printer weith IP.
thanks
Harry
"Arun" <arunkuma...@gmail.com> wrote in message
news:d40b404c-52bd-4500...@s8g2000prg.googlegroups.com...
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
"news.microsoft.com" <hssi...@phgt.net> wrote in message
news:OWyn6Dwc...@TK2MSFTNGP05.phx.gbl...
Try
Return conn.Send("192.168.0.100", 10)
Catch ex As Exception
End Try
End Function
Thing is when I execute the call and the printer is turned off, the app just
hangs.....figured the timeout was in milliseconds first yet the param is an
integer.
I want it to quickly check - like a quick ping and then if failed drop and
teturn false quickly - but it just kinda hangs up the first ping if false
and subsequent hits are fast.
that second param, does it control how quickly the PingReply is returned?
Harry
"<ctacke/>" <ctacke[at]opennetcf[dot]com> wrote in message
news:%23nkx3Mw...@TK2MSFTNGP05.phx.gbl...