New answers tagged tcp
1
Prefer using getaddrinfo()
You are using InetPton() to convert an IPv4 address to a sockaddr_in. However, this function has several drawbacks:
It does not perform DNS lookups, so you can't use a hostname to connect to a server.
You have to know up front which address family to use.
It doesn't fill in all of a sockaddr_in, it only provides you with the ...
Top 50 recent answers are included
Related Tags
tcp × 152c# × 62
socket × 53
server × 28
networking × 27
c++ × 21
python × 17
multithreading × 17
java × 16
c × 16
client × 13
beginner × 9
async-await × 9
.net × 7
asynchronous × 7
stream × 7
performance × 6
chat × 6
python-3.x × 5
object-oriented × 5
android × 5
go × 5
python-2.x × 4
rust × 4
task-parallel-library × 4