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. port number

port number

Scheduled Pinned Locked Moved C / C++ / MFC
sysadminquestion
11 Posts 8 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.
  • P p_

    hi all please tell me how can i know port number of my system and other system in the network thanks

    W Offline
    W Offline
    Waldermort
    wrote on last edited by
    #2

    Err, do you even know what a port is?

    Waldermort

    P 1 Reply Last reply
    0
    • W Waldermort

      Err, do you even know what a port is?

      Waldermort

      P Offline
      P Offline
      p_
      wrote on last edited by
      #3

      port is used to send data between to systems in the network i think i know this

      M 1 Reply Last reply
      0
      • P p_

        hi all please tell me how can i know port number of my system and other system in the network thanks

        V Offline
        V Offline
        vijay_aroli
        wrote on last edited by
        #4

        p_ wrote:

        please tell me how can i know port number of my system and other system in the network

        You mean you want to know 'IP-Address' of your system?

        Regards, Vijay. God may not give us what we 'want', but he surely gives us what we 'need'.

        1 Reply Last reply
        0
        • P p_

          hi all please tell me how can i know port number of my system and other system in the network thanks

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

          Port number (80=http or ftp=21)or IP of your system ?

          P 1 Reply Last reply
          0
          • H Hamid Taebi

            Port number (80=http or ftp=21)or IP of your system ?

            P Offline
            P Offline
            p_
            wrote on last edited by
            #6

            thanks sir i use this code on a button but it did not give any response CAsyncSocket m_sListener, m_sConnected; UpdateData(TRUE); m_sListener.Create(21); if(m_sListener.Listen()==FALSE) { AfxMessageBox("Unable to Listen on that port,please try another port"); m_sListener.Close(); return; } m_sConnected.Create(); m_sConnected.Connect("10.179.22.75",21); if( m_sListener.Listen()== FALSE) { AfxMessageBox("Unable to Listen ,please try another port"); m_sListener.Close(); return; } thanks

            H 1 Reply Last reply
            0
            • P p_

              thanks sir i use this code on a button but it did not give any response CAsyncSocket m_sListener, m_sConnected; UpdateData(TRUE); m_sListener.Create(21); if(m_sListener.Listen()==FALSE) { AfxMessageBox("Unable to Listen on that port,please try another port"); m_sListener.Close(); return; } m_sConnected.Create(); m_sConnected.Connect("10.179.22.75",21); if( m_sListener.Listen()== FALSE) { AfxMessageBox("Unable to Listen ,please try another port"); m_sListener.Close(); return; } thanks

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

              What was return value of Create and Listen if its 0 you got an error and better calling GetLastError for see error.

              1 Reply Last reply
              0
              • P p_

                hi all please tell me how can i know port number of my system and other system in the network thanks

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

                Your system has TCP/UDP port numbers 0 - 65535, and so does every other system in the network.

                1 Reply Last reply
                0
                • P p_

                  hi all please tell me how can i know port number of my system and other system in the network thanks

                  C Offline
                  C Offline
                  Cedric Moonen
                  wrote on last edited by
                  #9

                  There is no generic answer to your question simply because YOU define the port number. It totally depends of what you are trying to do: if you try to make two of your programs communicate, then you supply the port number on which the server will listen and you use this same port number in your client application. What are you trying to do exactly ? Without knowing that, we cannot help.


                  Cédric Moonen Software developer
                  Charting control [v1.2]

                  1 Reply Last reply
                  0
                  • P p_

                    hi all please tell me how can i know port number of my system and other system in the network thanks

                    B Offline
                    B Offline
                    beko
                    wrote on last edited by
                    #10

                    Hello, if you dont know the port you should listen or connect. you may check the port number that a program uses with netstat -a on command prompt. You gotta check manually what the port might be. then you can do the coding. Hope this helps. Bekir.

                    1 Reply Last reply
                    0
                    • P p_

                      port is used to send data between to systems in the network i think i know this

                      M Offline
                      M Offline
                      Mark Salsbery
                      wrote on last edited by
                      #11

                      I think you don't know this. The port element of an internet address associates an IP address with an application. This allows more than one application to use an IP address at the same time on a system. You are responsible for knowing the port numbers used by your applications. Mark

                      Mark Salsbery Microsoft MVP - Visual C++ :java:

                      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