Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Doubts about sockets in vc++

Doubts about sockets in vc++

Scheduled Pinned Locked Moved C / C++ / MFC
c++sysadminquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    thangvel
    wrote on last edited by
    #1

    please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side????:confused: if u give answer with sample code means i will be more happy..:cool: thanks in advance....:rose:

    L C M 4 Replies Last reply
    0
    • T thangvel

      please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side????:confused: if u give answer with sample code means i will be more happy..:cool: thanks in advance....:rose:

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      thangvel wrote:

      please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side?

      Yes, at the network level there is only one type of socket, and a CSocket is merely a C++ wrapper class for the basic socket mechanism.

      thangvel wrote:

      if u give answer with sample code means i will be more happy

      Unfortunately, you are going to be less happy. If you want source code you need to search the articles for samples; there are many.

      MVP 2010 - are they mad?

      1 Reply Last reply
      0
      • T thangvel

        please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side????:confused: if u give answer with sample code means i will be more happy..:cool: thanks in advance....:rose:

        C Offline
        C Offline
        CPallini
        wrote on last edited by
        #3

        There is no particular requirement on the Win32 socket connection, if in the other side there is a CSocket. So just have a look at the documentation [^]. :)

        If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
        This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
        [My articles]

        1 Reply Last reply
        0
        • T thangvel

          please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side????:confused: if u give answer with sample code means i will be more happy..:cool: thanks in advance....:rose:

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Sure. A socket is totally ignorant of what language dll is on top of it. You could connect one end in VB to another in Java.

          Morality is indistinguishable from social proscription

          1 Reply Last reply
          0
          • T thangvel

            please any one tell can we connect can we connect win32 socket in client side with CSocket class in server side????:confused: if u give answer with sample code means i will be more happy..:cool: thanks in advance....:rose:

            M Offline
            M Offline
            Moak
            wrote on last edited by
            #5

            thangvel wrote:

            can we connect win32 socket in client side with CSocket class in server side

            Yes you we can.

            thangvel wrote:

            if u give answer with sample code means i will be more happy

            I would not use the class CSocket instead use CAsyncSocket or something else. Have a look at Beej's guide to networking programming[^] and Winsock Programmer's FAQ[^], there are client/server examples in section 6. You can download, modify it and play with it. Hope it helps! :) /M

            Webchat in Europe :java: (only 4K)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups