Server works when hosted on 127.0.0.1, but doesn’t not work when testing it with a real ip. – C
This code works when using it locally(ip = 127.0.0.1), but doesn’t work when testing it with a real ip.
It doesn’t work when I host the server, nor when my friend hosts the server.
My friend suspects that it’s a firewall issue, but we both have it inactive – I checked with sudo ufw status
, he with sudo netstat -ntlp
.
How to have 100,000 clients connected to a server and zero threads? c++
The title is a bit exaggerated, but I want MAX clients that I can possibly have and I don’t want threads unless I need them.
Do I need a thread to accept()
TCP connections?
Why is TCP Header -> WINDOW being set to ZERO?
I have a snippet below which is a part of a code to create and send raw packet, which works by the way.
Why can I ping a unit, but when I attempt DNS.GetHostEntry(addr) I get No such host is known?
I am new to networking, so sorry if this is an obtuse question. I am attempting to communicate with a unit (device) on a network, but can’t. I am using .NET 2015 v4.8. I need to communicate tcp v1.3. I am on a windows 11 pc. In my code I am able to ping the unit, but cannot connect. I get the error below:
Error Message
WireShark tells me I’m seeking the wrong port.
WireShark Activity
What am I doing wrong?
Why is port number given when doing a DNS lookup?
In ASIO C++ networking library you can resolve an address by creating a query object, whose constructor takes (optionally whether it’s ip4 or ip6), a “host” argument and a “service” argument. The “host” is the name of the site you want to resolve to an IP number, and the “service” (I’m guessing) is the port number. So this does a DNS lookup/request, but my understanding is that DNS queries are for looking up associations between names and IP numbers, I don’t see how the port figures into this at all.