Reputation: 1523
I have written a program that talks to a Bittorrent tracker via a TCP connection. I want to expand it's functionality to talk to multiple trackers at the same time via winsock in C++.
Do I need to have multiple sockets? If so, do I need to initialize a WSADATA structure for each socket?
Upvotes: 1
Views: 873
Reputation: 84151
You need one socket per TCP connection, i.e. one per remote IP/port pair. You only need to call WSAStartup
once to initialize winsock library.
Upvotes: 2