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

CAsyncSocket

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
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.
  • X Offline
    X Offline
    xSoptik
    wrote on last edited by
    #1

    Hello all, I have CAsyncSocket class I have rewritten the virtual member function OnReceive: void CCommunication::OnReceive( int nErrorCode ) { if( nErrorCode == WSAENETDOWN ){ ASSERT( 0 ); return; } // do my useful task // parent CAsyncSocket::OnReceive( nErrorCode ); } This clas is used in main dialog window. Sometimes I am loosing packets ... Why? All packets are on the ethernet but I dont receive some of them. For example: There are 4 packets on the ETH but I receive only first three. This happens about three seconds after application start on Cel.900MHz@256MbRAM, and when I drag the main window by the title bar on the SempronMobile 3000+@704MbRAM The application is MFC dialog based. The communication is UDP. Thank you for any suggestion ... xSoptik

    S 1 Reply Last reply
    0
    • X xSoptik

      Hello all, I have CAsyncSocket class I have rewritten the virtual member function OnReceive: void CCommunication::OnReceive( int nErrorCode ) { if( nErrorCode == WSAENETDOWN ){ ASSERT( 0 ); return; } // do my useful task // parent CAsyncSocket::OnReceive( nErrorCode ); } This clas is used in main dialog window. Sometimes I am loosing packets ... Why? All packets are on the ethernet but I dont receive some of them. For example: There are 4 packets on the ETH but I receive only first three. This happens about three seconds after application start on Cel.900MHz@256MbRAM, and when I drag the main window by the title bar on the SempronMobile 3000+@704MbRAM The application is MFC dialog based. The communication is UDP. Thank you for any suggestion ... xSoptik

      S Offline
      S Offline
      S Douglas
      wrote on last edited by
      #2

      xSoptik wrote: All packets are on the ethernet but I dont receive some of them. For example: There are 4 packets on the ETH but I receive only first three. That's one of the down falls to using datagram sockets (UDP). Search the MSDN for more information. Here is a quick article there detailing the potention problems. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_Windows_Sockets.3a_.Ports_and_Socket_Addresses.asp[^] Hope this helps... ------------------------------- DEBUGGING : Removing the needles from the haystack.

      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