Client/Server Messaging with PocketPC

  • Thread starter Thread starter db
  • Start date Start date
D

db

I need to write some basic code that will let me send messages to/from
a PocketPC. In the past, when I was using VB6, I did this using the
Winsock control and setting one machine as the client and the other as
the server. I assume I could take a similar approach here, but wanted
to see if anyone could give me any suggestions as to where to start.
I'm using .NET 2003 and Windows Mobile 2003 if that helps. This is
nothing really complex, I just need to send basic command strings from
the PocketPC back to the desktop - the PPC will essentially be a remote
control for the desktop application. Thanks.

-Dave
 
db,

Have you taken a look at the System.Sockets namespace?

Also, you might want to consider using Remoting here, if you have .NET
on both sides. I'm not sure what the support for remoting is in the compact
framework, but if you have it, I would use it, as it woud give you much more
flexibility in the kinds of messages you can send.

Hope this helps.
 
db,

Have you taken a look at the System.Sockets namespace?

Also, you might want to consider using Remoting here, if you have .NET
on both sides. I'm not sure what the support for remoting is in the compact
framework, but if you have it, I would use it, as it woud give you much more
flexibility in the kinds of messages you can send.

Hope this helps.
 
Nicholas, thanks for the quick response. I'm just starting to go
through the Sockets info in the .NET help. Any limitations, concerns I
should be aware of? I think I'd rather go with TCP over UDP since the
data transfer seems more robust. Thoughts?
 
db,

If you can afford to have packets drop, then go with UDP. Otherwise, go
with TCP. It all depends on the requirements of your application.
 
Hi,
I'm not sure what the support for remoting is in the compact framework,

Nop, it's not supported :(

A TCP connection is the way to go.





cheers,
 
I'm exploring some TCP code now by trying to modify some sample code.
The TCPListener I'm using on the Server side doesn't appear to be
event-driven. For the way I'm approaching this, it'd be great to have
events for "ConnectionRequestReceived" and "DataReceived." Can I try
to implement this behavior myself?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top