Luis Silva
Luis Silva

Reputation: 3

How do I establish a UDP connection after a TCP connection?

Hi guys I'm currently developing a C project in which we basically need to connect N clients to a server through a proxy. I'm doing the first connecting using the TCP protocol. After this, the client may request a file download using UDP. Do I need to have another socket listening to another port and connect the client again to this port or is this an incorrect way of thinking?

Upvotes: 0

Views: 403

Answers (1)

dbush
dbush

Reputation: 223689

TCP and UDP communicate in very different ways. You'll need a separate socket for each one.

You'll probably want to use the TCP socket to communicate the UDP port to use.

Upvotes: 2

Related Questions