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. Socket behind FireWall

Socket behind FireWall

Scheduled Pinned Locked Moved C / C++ / MFC
c++sysadminjsontutorialquestion
5 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.
  • U Offline
    U Offline
    unknown soldier
    wrote on last edited by
    #1

    I like to connect to a certain port of server on Internet. For this purpose my application uses the well known function of WinSock API, connect() having prototype : int connect( SOCKET s, const struct sockaddr FAR *name, int namelen ); But, before i use this function, i have to populate "struct sockaddr" about the port and address of server. right !! Suppose, my client application is running on a machine behind a firewall eg SOCKS. Then please tell me how can i connect to server under this condition. I shall be thankful if you explain me clearly or write some example pseudocode. There is an example present at CP, but it is not too good to understand and it uses MFC Socket Classes.

    N M M 3 Replies Last reply
    0
    • U unknown soldier

      I like to connect to a certain port of server on Internet. For this purpose my application uses the well known function of WinSock API, connect() having prototype : int connect( SOCKET s, const struct sockaddr FAR *name, int namelen ); But, before i use this function, i have to populate "struct sockaddr" about the port and address of server. right !! Suppose, my client application is running on a machine behind a firewall eg SOCKS. Then please tell me how can i connect to server under this condition. I shall be thankful if you explain me clearly or write some example pseudocode. There is an example present at CP, but it is not too good to understand and it uses MFC Socket Classes.

      N Offline
      N Offline
      Nish Nishant
      wrote on last edited by
      #2

      http://www.codeproject.com/useritems/winsockintro02.asp


      Author of the romantic comedy Summer Love and Some more Cricket [New Win]

      U 1 Reply Last reply
      0
      • U unknown soldier

        I like to connect to a certain port of server on Internet. For this purpose my application uses the well known function of WinSock API, connect() having prototype : int connect( SOCKET s, const struct sockaddr FAR *name, int namelen ); But, before i use this function, i have to populate "struct sockaddr" about the port and address of server. right !! Suppose, my client application is running on a machine behind a firewall eg SOCKS. Then please tell me how can i connect to server under this condition. I shall be thankful if you explain me clearly or write some example pseudocode. There is an example present at CP, but it is not too good to understand and it uses MFC Socket Classes.

        M Offline
        M Offline
        markkuk
        wrote on last edited by
        #3

        Use SocksCap.

        1 Reply Last reply
        0
        • N Nish Nishant

          http://www.codeproject.com/useritems/winsockintro02.asp


          Author of the romantic comedy Summer Love and Some more Cricket [New Win]

          U Offline
          U Offline
          unknown soldier
          wrote on last edited by
          #4

          Sorry Nish, yo didn't get my question I know very well how to connect to server. What i want to ask is that if firewall present at client side then how can we connect to server.

          1 Reply Last reply
          0
          • U unknown soldier

            I like to connect to a certain port of server on Internet. For this purpose my application uses the well known function of WinSock API, connect() having prototype : int connect( SOCKET s, const struct sockaddr FAR *name, int namelen ); But, before i use this function, i have to populate "struct sockaddr" about the port and address of server. right !! Suppose, my client application is running on a machine behind a firewall eg SOCKS. Then please tell me how can i connect to server under this condition. I shall be thankful if you explain me clearly or write some example pseudocode. There is an example present at CP, but it is not too good to understand and it uses MFC Socket Classes.

            M Offline
            M Offline
            Mike Nordell
            wrote on last edited by
            #5

            Grab yourself a copy of Privoxy and have a look inside gateway.c.

            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