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. CAsyncSocket server questions

CAsyncSocket server questions

Scheduled Pinned Locked Moved C / C++ / MFC
questionsysadmin
2 Posts 2 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.
  • M Offline
    M Offline
    MikeRWinter
    wrote on last edited by
    #1

    Hi all i have been experimenting with CAsyncSocket and have derived my own class. I am able to connect a client to a server app that I have written (VC6) and all is working well. My first question is why does the server have to accept on another socket? My second question is if the server is to be designed to accept 64 clients connecting to it, does that mean I need to define 128 sockets Thanks for having a look at this! Regards Mike

    M 1 Reply Last reply
    0
    • M MikeRWinter

      Hi all i have been experimenting with CAsyncSocket and have derived my own class. I am able to connect a client to a server app that I have written (VC6) and all is working well. My first question is why does the server have to accept on another socket? My second question is if the server is to be designed to accept 64 clients connecting to it, does that mean I need to define 128 sockets Thanks for having a look at this! Regards Mike

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

      MikeRWinter wrote:

      My first question is why does the server have to accept on another socket?

      TCP is a connection oriented protocol, the server needs to accept the connection and a handshake is performed before further communication will be possible (which is part of TCP's reliable data transfer). On the other hand, if you are working with UDP, which is not connection oriented, you don't have to call accept(), sockets can just send data when they feel like (which could also mean nobody is listening to them).

      MikeRWinter wrote:

      My second question is if the server is to be designed to accept 64 clients connecting to it,

      Where does this limit come from, not sure what you mean? /Moak

      Chat in Europe :java: Now with 24% more Twitter

      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