.NET Components for Mobility

C# Examples...

Last post 06-06-2008 9:43 AM by surf_uk. 8 replies.
Page 1 of 1 (9 items)
Sort Posts: Previous Next
  • 09-21-2005 5:12 PM

    • Gee666
    • Not Ranked
    • Joined on 09-21-2005
    • Posts 0

    C# Examples...

    OK, hope the title to this post isn't misleading!

    All of the examples are in VB.net which, if you have made the move to Java and C# (like me), you may find somewhat foreign.

    I have found this tool invaluable in trying to further my understanding of the examples...

    http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx

    Gee
  • 09-21-2005 6:08 PM In reply to

    Re: C# Examples...

    Thanks, I'll try and make C# versions of some of the samples available soon.

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 09-21-2005 8:07 PM In reply to

    • Gee666
    • Not Ranked
    • Joined on 09-21-2005
    • Posts 0

    Re: C# Examples...

    Hi Peter

    Perhaps this is something I can help with (when I can fit in a spare five minutes)?  I'd like to try and make a real contribution to the project as I am no doubt going to be an akward user initially!!

    I am curious about a couple of things though.

    First off, would it be that much of a benefit to use asynchronous sockets for a desktop bluetooth "server" since it can only accept a limited number of connections?

    And secondly, closely linked, is there any example code (VB or C#) that I could look at as I have to be honest and admit that I normally code the threading stuff myself so the approach of using a pool makes sense (in theory) but in practice is very different!!!

    Thank you again for your fast response and for all of the hard work you have put into the library!

     

    Gee

     

  • 09-21-2005 9:42 PM In reply to

    Re: C# Examples...

    If you look at the DesktopListener in the samples folder you'll see this implements a very simple server using a single background thread. Since each individual service can potentially only answer a single request at a time then this simple model works fairly well, if you have something which listens on multiple services then you'll probably have them each in separate threads anyhow. Although it should support all the usual Socket functionality the code hasn't been tested with the async methods.

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
  • 09-21-2005 11:19 PM In reply to

    • Gee666
    • Not Ranked
    • Joined on 09-21-2005
    • Posts 0

    Re: C# Examples...

    I won't leap into the async stuff just yet then....!

    I have a background thread like the example but the plan is to spawn a new thread for each accepted request so it can process accordingly and get the background thread back to listening again as soon as possible, allowing for multiple connections to the same GUID (in theory anyway).

    I am planning on limiting the number of concurrent threads to five (plus 1 background totals 6), which should be safe on most bluetooth dongles as the standard recommends no more than 7 concurrent piconets.... supossedly...!

    I will post code once I have ironed out some of the other wrinkles..!

    Catch you on the other thread! (Please excuse the dire pun...)

     

    Gee

     

  • 10-18-2005 1:05 PM In reply to

    • Gee666
    • Not Ranked
    • Joined on 09-21-2005
    • Posts 0

    Re: C# Examples...

    Hi

    My understanding was 7 concurrent connections - but I may be wrong (I only glanced over the standard!).  Unfortunately, it was a late night browsing that night and my URL history has been long trashed and so I cannot even offer up a link (or follow it to answer the question more definitavely)

     

    Hope that helps  :S

    Gee

  • 05-28-2008 12:34 PM In reply to

    • bernardotorres
    • Top 150 Contributor
    • Joined on 05-27-2008
    • Florianópolis, SC - Brasil
    • Posts 4

    Re: C# Examples...

     I'm not being able to open http://32feet.net/files/folders/samples/entry3546.aspx examples in VS 2008. It converts the sample, but can't open the .csproj file.


    Anybody with the same problem?

     

    Cheers,


    Bernardo

    http://www.torresautomacao.com.br/
  • 06-06-2008 9:43 AM In reply to

    Re: C# Examples...

    Having downloaded the 32Feet bluetooth samples (C#) I cannot open any of them, the samples in question are found here (BT1-6):

    http://inthehand.com/files/folders/samples/default.aspx

    The error I get in VS 2005 is "Error retrieving information from user datastore. Platform not found." does this suggest I need VS 2008 or a platform SDK of some sort?

     

    Thanks

    Ross 

     

Page 1 of 1 (9 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.