DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 13 of 13

Thread: Socket programming

  1. #1
    Join Date
    Apr 2005
    Posts
    5

    Socket programming

    I have already some experience with socket programming. But now I would like to use socket programming for a Bluetooth connection. Does anybody know how to do this? Iíve done it before for a wired network, and then you just had to use a tcpClient and a tcpListener, and in the client program you just had to give in the ip address of the computer where you had your server program and it worked. But how is this for Bluetooth and pocket devices? Do you also have to use a tcpClient and tcpListener? Or is it totally different? And what do you have to use in stead of the IP address? My program language is VB.NET, but it doesnít matter if itís a C# example.

    Thx
    Eagle

  2. #2
    Join Date
    Nov 2003
    Posts
    4,118
    WInsock is pretty much the same because it represents an abstraction layer that is beyond the physical properties of the data transfer. There are several good tutorials on Winsock-based BTH programming. This one contains a C/C++ sample which is pretty strightforward. Notice for example a server socket is created:
    SOCKET s = socket (AF_BT, SOCK_STREAM, BTHPROTO_RFCOMM);
    Danny Kalev

  3. #3
    Join Date
    Apr 2005
    Posts
    5

    sockets

    Hi,

    Thanks for you quick answer, but do you also have a VB.NET example? Is it possible with VB.NET?

    Thx
    Eagle

  4. #4
    Join Date
    Nov 2003
    Posts
    4,118
    I'm not a VB expert exactly so I don't know if it's feasible in VB. However, I'll ask some of the VB experts if they have any samples.
    Danny Kalev

  5. #5
    Join Date
    Apr 2005
    Posts
    5

    Thx

    Thank you very much!!!!!

  6. #6
    Join Date
    Feb 2007
    Location
    At home.
    Posts
    2
    dear`eagle and danny..nice to know you too are working in something that i need...i m a final year student of enginering from india.....My final year project includes the development of a GUI in VC++ environment that will connect two Bluetooth enabled computers and allow them to communicate..im currently learning VC++ and Winsock...but i dont know how to proceed next....how to incorporate the Bluetooth functionaliy...im really in a fix cuz i have to finish the project at avery short notice...could you plz guide me on how to proceed further..like what should be the necessary steps....

  7. #7
    Join Date
    Nov 2003
    Posts
    4,118
    What I would do is look for an existing, simple but working project and try to learn from the code how the BT functionality is used.
    Danny Kalev

  8. #8
    Join Date
    Feb 2007
    Location
    At home.
    Posts
    2
    great ..but where do i get that???

  9. #9
    Join Date
    May 2007
    Posts
    1
    Hello everybody!

    I'm trying to develop a Bluetooth application using winsocks, but my problem is that i cannot create the socket.
    When I execute "socket(AF_BTH, SOCK_STREAM, BTHPROTO_RFCOMM)"
    the application falls with the next error : 10047 (WSAEAFNOSUPPORT => An address incompatible with the requested protocol was used.)

    I have the next include's:
    #include <winsock2.h>
    #include <Ws2bth.h>
    #include <BluetoothAPIs.h>

    Should I need to add something else to my proyect?, or maybe should I need change some configuration properties on my operating system?

    Thanks.

  10. #10
    Join Date
    May 2007
    Posts
    2
    anyone plz help me out with following ques..it's needed for my interview process

    What is Socket Programming-


    What are its functions-


    What exactly it does-


    Where exactly its used-


    Kindly give the day to day basis example in short-

  11. #11
    Join Date
    Nov 2003
    Posts
    4,118
    These are not simple questions I'm afraid. You need to learn socket programming thoroughly from a book, an online tutorial etc. Furthermore, you need to gain some experience in this area, not just the theory.
    A quick "socket programminng" search on Google will certainly direct you to some tutorials.
    Danny Kalev

  12. #12
    Join Date
    Apr 2006
    Posts
    6

    Post

    Visit this site for details of socket programming. www.uwo.ca/its/doc/courses/notes/socket/

  13. #13
    Join Date
    Sep 2007
    Posts
    1
    Hi.
    im still new to socket programming. But im writing a server socket. I managed to create and bind successfully but im not getting any connections being accepted. I need to listen on port 5545. I just used htons(5545). Is it possible that im missing some conversion or listening on the wrong port. Please help! Oh using c and winsock.Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center