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. Where can i find a good socket class

Where can i find a good socket class

Scheduled Pinned Locked Moved C / C++ / MFC
c++help
7 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.
  • A Offline
    A Offline
    Atif Mushtaq
    wrote on last edited by
    #1

    well guys i am tired of using CSocket and CAsyncSocket buggy MFC sockets classes. It was biggest mistake i did when i started two huge projects using these classes .now these projects are complete but the problem is , it is giving satisfactory results but not really good(Normally after some communication CSocket becomes useless , so i have to close it and again establishing connection and it is due to buggy message pumping mechanism of these sockets) so if any have some good implemention of WINSOCK , specially a class which could handle the event notification like OnRecieve , OnCLose as in CSocket , and almost the same public initerface as CSocket etc. It will make it possible to streight away replace CSocket with new one and no change in my existing projects . If some body could refer some tested code in this regard , i 'll be really thankfull to him. No Worries!

    R I 2 Replies Last reply
    0
    • A Atif Mushtaq

      well guys i am tired of using CSocket and CAsyncSocket buggy MFC sockets classes. It was biggest mistake i did when i started two huge projects using these classes .now these projects are complete but the problem is , it is giving satisfactory results but not really good(Normally after some communication CSocket becomes useless , so i have to close it and again establishing connection and it is due to buggy message pumping mechanism of these sockets) so if any have some good implemention of WINSOCK , specially a class which could handle the event notification like OnRecieve , OnCLose as in CSocket , and almost the same public initerface as CSocket etc. It will make it possible to streight away replace CSocket with new one and no change in my existing projects . If some body could refer some tested code in this regard , i 'll be really thankfull to him. No Worries!

      R Offline
      R Offline
      Rickard Andersson20
      wrote on last edited by
      #2

      How familiar with Winsock are you? I prefer writing your own class from scratch and implement the features you want and nothing else. I'm doing this right now for a project in school. But you can always try google :) Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318

      T 1 Reply Last reply
      0
      • R Rickard Andersson20

        How familiar with Winsock are you? I prefer writing your own class from scratch and implement the features you want and nothing else. I'm doing this right now for a project in school. But you can always try google :) Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318

        T Offline
        T Offline
        toxcct
        wrote on last edited by
        #3

        dit you have a look on CSocket...?;P TOXCCT

        R 1 Reply Last reply
        0
        • T toxcct

          dit you have a look on CSocket...?;P TOXCCT

          R Offline
          R Offline
          Rickard Andersson20
          wrote on last edited by
          #4

          What do you mean? BTW, your name reminds me about Britney's latest video, Toxic! :drool: ;) Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318

          T 1 Reply Last reply
          0
          • R Rickard Andersson20

            What do you mean? BTW, your name reminds me about Britney's latest video, Toxic! :drool: ;) Rickard Andersson Here is my card, contact me later! UIN: 50302279 Sonork: 37318

            T Offline
            T Offline
            toxcct
            wrote on last edited by
            #5

            :confused:well, there is a CSocket class in the Visual C++ library, and i thought you did watched it... ;) emm, for my name, it means The Toxic Dream, but that was too long to write so here is the "condensed shape"... ;P a last thing, excuse me for my very poor english, i do my best, but when you're french...:-D it's not easy . I hope you understand me anyway... i think so TOXCCT

            1 Reply Last reply
            0
            • A Atif Mushtaq

              well guys i am tired of using CSocket and CAsyncSocket buggy MFC sockets classes. It was biggest mistake i did when i started two huge projects using these classes .now these projects are complete but the problem is , it is giving satisfactory results but not really good(Normally after some communication CSocket becomes useless , so i have to close it and again establishing connection and it is due to buggy message pumping mechanism of these sockets) so if any have some good implemention of WINSOCK , specially a class which could handle the event notification like OnRecieve , OnCLose as in CSocket , and almost the same public initerface as CSocket etc. It will make it possible to streight away replace CSocket with new one and no change in my existing projects . If some body could refer some tested code in this regard , i 'll be really thankfull to him. No Worries!

              I Offline
              I Offline
              Imran Farooqui
              wrote on last edited by
              #6

              In my experience, as far as client side is concerned, CSocket/ASyncSocket should never cause any trouble. Though i personally prefer CAsyncSocket over CSocket, to avoid blocking issues. As such CAsyncSocket requires special care[^]. If we talk about server side, it depends upon the scalability desired (i.e the maximum number of users you want to simultaneously connect) and throughput (Data flow rate into and out of server). If both the attributes are low CAysncSocket should work fine. Otherwise you may need to dig into WinSock API and I/O completion ports.

              A 1 Reply Last reply
              0
              • I Imran Farooqui

                In my experience, as far as client side is concerned, CSocket/ASyncSocket should never cause any trouble. Though i personally prefer CAsyncSocket over CSocket, to avoid blocking issues. As such CAsyncSocket requires special care[^]. If we talk about server side, it depends upon the scalability desired (i.e the maximum number of users you want to simultaneously connect) and throughput (Data flow rate into and out of server). If both the attributes are low CAysncSocket should work fine. Otherwise you may need to dig into WinSock API and I/O completion ports.

                A Offline
                A Offline
                Atif Mushtaq
                wrote on last edited by
                #7

                first of all i want to brief u about my project. It is a Video streaming software , so almost 5 tp 20 k data is sent across sockets per sec.For this i am using sockets with CSocketFile and CArchive attatched to CSocket object that is why i cant use CAsyncSocket . what happens that after on average 10 to 15 frames , data socket becomes usless in a sense that even server sends me data but on client side OnRecieve does not calls . and on server end Send does not returns any error code.so what happens in this condition i close socket and reconnect with server , although i do it transparent from user , but surely a kinda delay comes. So now my question is it due to CSocket , blocking nature (although i can use CAsynSocket cauz i am doing synchronize communication) but due to CSocketFile and CArchive i am using it. No Worries!

                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