Determining address for UDP sendto calls after a prior TCP connection
I am using C and the POSIX libraries.
I establish a TCP connection between a server and a client which I use to send low bandwidth control commands in both directions using 'send' and 'recv'.
I then want to stream audio from the server to the client using UDP through the call 'sendto'. However, I would do not know how to quickly set up the 4th and 5th parameters of the call. These being: struct sockaddr *to & socklen_t tolen. Ideally I would imagine I could use the information from the 'accept' call that the server already used to setup the TCP connection.
Would anyone know how I would go about this?