hi everyone,

I am currently using windows 98 and want to find out what the port number and computer name and ip address for my computer is. Is there a way or a file i can go to get the answers to my above questions.
My e-mail is

Any amount of help is deeply appreciated.

Thank You

Yours Sincerely

Richard West

Dani AI

Generated

Short answer: to make a C++ socket client connect you need two things from the target machine — a reachable network address (an IP address or a hostname that your client can resolve) and the exact TCP/UDP port that a server process on that machine is listening on. There is no single file on a PC that contains “the port number” for the computer as a whole; ports are per-process runtime resources and are chosen by the server or by the OS when a program asks for an ephemeral port.

Practical checklist

  • Server side: decide a fixed port for your server (avoid well-known reserved ports), start the server so it listens on that port, and make sure any local firewall or router allows inbound connections (forward the port if the server is behind NAT).
  • Client side: obtain the server’s reachable IP or hostname and the agreed port. If machines are on the same LAN you can use name-resolution methods common to that network; across the internet you usually need a public IP or DDNS plus port forwarding on the server’s router. If you don’t control the server, ask its owner for the port and address — you cannot reliably guess a service’s port without permission.

Minimal connection flow (pseudo-code)

addr = resolve(hostname_or_ip)
sock = socket()
if connect(sock, addr, port) == success:
    send/recv data
close(sock)

Troubleshooting and notes

  • If connect fails, verify the server process is running and actually listening, check firewall/NAT, confirm the correct IP/hostname and port, and make sure the chosen port is not already used.
  • Port ranges: 0–1023 are well-known, 1024–49151 are registered, 49152–65535 are dynamic/private.
  • As suggested, check local system/network identification for your own address; is correct that ports are service-specific; ’s point about listing active network services is useful for verifying what the server has open. Do not scan or probe other people’s systems without explicit permission.

Recommended Answers

All 8 Replies

Right click mycomputer/properties will give you most info about your computer or control panel, system icon .not sure what port # you are refering to.
Ip address .type winipconfg in start/run i think will work ,I haven't used win98 for a couple of yrs now .

Ip address .type winipconfg in start/run i think will work ,I haven't used win98 for a couple of yrs now .

"winipcfg" is the correct spelling, but yes- that will give you all of your IP configuration info.

In terms of your question about the port #, you would have to clarify that by giving us more specific information. Network applications and/or services all use different ports, but that info isn't anything you usually have to configure or worry about.

port nos. vary depeding on the protocol using them.

in command prompt u can run "netstat -a" to see what protocols are running,their port nos. their conn. status etc.

hi everyone,
What i am doing is writing a simple socket program using c++ to connect to another pc. The socket properties requires a port number and computer name to connect to that particular pc. Thus this what i am trying to find out is how to get the other pc's port number and computer name

Thank You

Yours Sincerely

Richard West

The port you connect to will depend on the protocol you are using to communicate and what service you expect to have listening for a connection on the machine you're connecting to. The official list of port assignments can be found here:

http://www.iana.org/assignments/port-numbers

hi,
what i want to know is to find out the source "Port Number" of a known IP Address. I am not talking about my own IP address.
thank u
madeolu

*bleep* this crappy website i want to know how to find people ip address and port number *bleep* this *bleep* website

*bleep* this crappy website i want to know how to find people ip address and port number *bleep* this *bleep* website

AH, did your mommy give a beating on you bottom today and your all mad ,get a life

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.