locked
C# Wireless Socket -> Desktop Application RRS feed

  • Question

  • Hi everybody ::- ). I'm wondering how I could connect 2 C# applications via wireless, 1 on my phone, 1 on the desktop.

    I read about the ConnectionManager but I didn't find any sample code in C# to help me do it, nor documentation about how this is done.

    Could anybody please point me into the right direction or throw some C# at me? ::- ).

    Thank you!

    Friday, May 28, 2010 11:13 AM

Answers

  • If by "wireless" you mean Wifi, and the phone and the PC is in the same LAN, you can use TcpClient/TcpListener class to make communications between them. Below is a code sample:

    Creating Desktop Application Remote Controls with the .NET Compact Framework (Part 1)
    http://www.codeproject.com/KB/windows/pocketremote.aspx 


    Please mark the post that helps you, and unmark that does not. This benefits our community.
    • Marked as answer by warrentang Thursday, June 3, 2010 2:32 AM
    Monday, May 31, 2010 9:00 AM

All replies

  • If by "wireless" you mean Wifi, and the phone and the PC is in the same LAN, you can use TcpClient/TcpListener class to make communications between them. Below is a code sample:

    Creating Desktop Application Remote Controls with the .NET Compact Framework (Part 1)
    http://www.codeproject.com/KB/windows/pocketremote.aspx 


    Please mark the post that helps you, and unmark that does not. This benefits our community.
    • Marked as answer by warrentang Thursday, June 3, 2010 2:32 AM
    Monday, May 31, 2010 9:00 AM
  • Thank you very much Chunsheng! Your link gave me the perfect solution ::- ). It even abstracts going through the CommunicationManager! That's great.
    Thursday, June 3, 2010 4:39 PM