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. "SD_BOTH": undeclared identifier

"SD_BOTH": undeclared identifier

Scheduled Pinned Locked Moved C / C++ / MFC
7 Posts 6 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.
  • W Offline
    W Offline
    willempipi
    wrote on last edited by
    #1

    why do i get this message wenn i do this: shutdown(sock, SD_BOTH); :wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf: my includes are: #include "stdafx.h" #include "stdio.h" #include "tchar.h" #include "process.h" #include "crtdbg.h"

    J W N J J 6 Replies Last reply
    0
    • W willempipi

      why do i get this message wenn i do this: shutdown(sock, SD_BOTH); :wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf: my includes are: #include "stdafx.h" #include "stdio.h" #include "tchar.h" #include "process.h" #include "crtdbg.h"

      J Offline
      J Offline
      jeremysay
      wrote on last edited by
      #2

      hello you can try "#include winsock2.h" i hope that help you

      1 Reply Last reply
      0
      • W willempipi

        why do i get this message wenn i do this: shutdown(sock, SD_BOTH); :wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf: my includes are: #include "stdafx.h" #include "stdio.h" #include "tchar.h" #include "process.h" #include "crtdbg.h"

        N Offline
        N Offline
        Nitron
        wrote on last edited by
        #3

        I think you need to link with ws2_32.lib You may need winsock2.h also, but I'm not sure. - Nitron


        "Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb

        1 Reply Last reply
        0
        • W willempipi

          why do i get this message wenn i do this: shutdown(sock, SD_BOTH); :wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf: my includes are: #include "stdafx.h" #include "stdio.h" #include "tchar.h" #include "process.h" #include "crtdbg.h"

          W Offline
          W Offline
          willempipi
          wrote on last edited by
          #4

          lol, thnx ;P

          1 Reply Last reply
          0
          • W willempipi

            why do i get this message wenn i do this: shutdown(sock, SD_BOTH); :wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf: my includes are: #include "stdafx.h" #include "stdio.h" #include "tchar.h" #include "process.h" #include "crtdbg.h"

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

            Maybe #include winsock2.h will do the trick? There is shutdown declared, according to MSDN.


            My opinions may have changed, but not the fact that I am right.

            1 Reply Last reply
            0
            • W willempipi

              why do i get this message wenn i do this: shutdown(sock, SD_BOTH); :wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf: my includes are: #include "stdafx.h" #include "stdio.h" #include "tchar.h" #include "process.h" #include "crtdbg.h"

              J Offline
              J Offline
              Joaquin M Lopez Munoz
              wrote on last edited by
              #6

              This is oddly missing from winsock.h, use this instead:

              shutdown(sock, 2);

              Joaquín M López Muñoz Telefónica, Investigación y Desarrollo

              1 Reply Last reply
              0
              • W willempipi

                why do i get this message wenn i do this: shutdown(sock, SD_BOTH); :wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf::wtf: my includes are: #include "stdafx.h" #include "stdio.h" #include "tchar.h" #include "process.h" #include "crtdbg.h"

                V Offline
                V Offline
                valikac
                wrote on last edited by
                #7

                You past the wrong parameter to shutdown(). shutdown(theSocket, SB_BOTH); Kuphryn

                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