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. Exception in socket programming

Exception in socket programming

Scheduled Pinned Locked Moved C / C++ / MFC
c++sysadmindebugginghelp
3 Posts 3 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.
  • G Offline
    G Offline
    gReaen
    wrote on last edited by
    #1

    Hello everyone I'm doing a single client server application. After receiving a file from the client, server gets closed with the following exception. Debug assertion failed! Program: path of file File: winhand.cpp Line: 229 But the file is getting transferred correctly. And i need to send more than one file without connection being closed. Plz help...

    L H 2 Replies Last reply
    0
    • G gReaen

      Hello everyone I'm doing a single client server application. After receiving a file from the client, server gets closed with the following exception. Debug assertion failed! Program: path of file File: winhand.cpp Line: 229 But the file is getting transferred correctly. And i need to send more than one file without connection being closed. Plz help...

      L Offline
      L Offline
      Llasus
      wrote on last edited by
      #2

      First use GetLastError() to check the error number and find out what the exact problem is. It may be in either application which closes the socket after receiving/sending. Or it can be possible that the socket was declared locally inside a function, that's why on exit the socket is released. Try GetLastError first to check the error code. :) Also you should put some checking on the returns of the socket functions to check if the function was successful, otherwise it wouldn't have been generating assert errors like that, just failure to do the functions correctly.

      1 Reply Last reply
      0
      • G gReaen

        Hello everyone I'm doing a single client server application. After receiving a file from the client, server gets closed with the following exception. Debug assertion failed! Program: path of file File: winhand.cpp Line: 229 But the file is getting transferred correctly. And i need to send more than one file without connection being closed. Plz help...

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        See Network Transfer Of Files Using MFC's CSocket Class[^] if helpfuls.

        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