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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. windows socket programming

windows socket programming

Scheduled Pinned Locked Moved C / C++ / MFC
questioncsharpvisual-studiosysadminhelp
7 Posts 5 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.
  • U Offline
    U Offline
    User 10723047
    wrote on last edited by
    #1

    hello every body i try to develop a client and a server project by visual studio 2010! now i have alot of question 1- how can i test the connection between client and server??? 2- how my server could have a list of connected clients??? please help me :(( i am a beginner!!!

    J J J 3 Replies Last reply
    0
    • U User 10723047

      hello every body i try to develop a client and a server project by visual studio 2010! now i have alot of question 1- how can i test the connection between client and server??? 2- how my server could have a list of connected clients??? please help me :(( i am a beginner!!!

      J Offline
      J Offline
      Jochen Arndt
      wrote on last edited by
      #2

      To test your programs start them both on your machine and use the loopback device (IP: 127.0.0.1, name: localhost) for listening and connection. If a server accepts and handles multiple connections at the same time the state of each connection is typically stored in some manner. This must be implemented by you and the information to be stored depends on your requirements. If you need a list of clients, one piece of information to be stored is the client IP. I suggest to start with a server that accepts only one client at time. Then you can test the communication and implement multiple client support when the other things are working.

      1 Reply Last reply
      0
      • U User 10723047

        hello every body i try to develop a client and a server project by visual studio 2010! now i have alot of question 1- how can i test the connection between client and server??? 2- how my server could have a list of connected clients??? please help me :(( i am a beginner!!!

        J Offline
        J Offline
        jeron1
        wrote on last edited by
        #3

        In addition to what Jochen has mentioned, I would look at WireShark which is a tool to view network communications. I have found it invaluble for debugging network type applications, though I think client and server have to be on different machines (I could be wrong on that one) for Wireshark to record the data.

        A J 2 Replies Last reply
        0
        • J jeron1

          In addition to what Jochen has mentioned, I would look at WireShark which is a tool to view network communications. I have found it invaluble for debugging network type applications, though I think client and server have to be on different machines (I could be wrong on that one) for Wireshark to record the data.

          A Offline
          A Offline
          Albert Holguin
          wrote on last edited by
          #4

          Wireshark is a must have for network programming :thumbsup: ...I do remember some issue with seeing the loopback data, but I can't remember it 100%... think you get spoiled having a bunch of computers sitting on your desk at all times.

          1 Reply Last reply
          0
          • J jeron1

            In addition to what Jochen has mentioned, I would look at WireShark which is a tool to view network communications. I have found it invaluble for debugging network type applications, though I think client and server have to be on different machines (I could be wrong on that one) for Wireshark to record the data.

            J Offline
            J Offline
            jschell
            wrote on last edited by
            #5

            Myself I doubt a beginner with no experience in sockets is going to get much use out of wireshark.

            J 1 Reply Last reply
            0
            • U User 10723047

              hello every body i try to develop a client and a server project by visual studio 2010! now i have alot of question 1- how can i test the connection between client and server??? 2- how my server could have a list of connected clients??? please help me :(( i am a beginner!!!

              J Offline
              J Offline
              jschell
              wrote on last edited by
              #6

              Member 10757148 wrote:

              1- how can i test the connection between client and server???

              Write TWO applications. One does only client. One does only server. For testing you can there run each individually in TWO instances of VS 2010. (You can run from the command line as well but you will probably want to use the debugger in VS.)

              Member 10757148 wrote:

              2- how my server could have a list of connected clients???

              You should try reading up a bit on sockets. Much of it won't make sense but it will give you some more basics on 'how' a server handles multiple clients. That said I would STRONGLY suggest that you first start with only a single client.

              1 Reply Last reply
              0
              • J jschell

                Myself I doubt a beginner with no experience in sockets is going to get much use out of wireshark.

                J Offline
                J Offline
                jeron1
                wrote on last edited by
                #7

                I don't know, I started using it almost immediately, while debugging my first network type application.

                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