LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 02-08-2010, 05:15 PM   #1
sh86
LQ Newbie
 
Registered: Feb 2010
Posts: 1

Rep: Reputation: 0
Question 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?
 
Old 02-09-2010, 10:53 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Here is a great resource, which will answer this (and many other!) questions for you:

Beej's Guide to Network Programming

ALSO:
Please download, install and experiment with: Wireshark
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Use send() instead of sendto() for UDP fjkum Programming 2 01-20-2010 10:16 PM
sendto function call in UDP client program chakka.lokesh Programming 1 01-05-2010 10:53 PM
Checking if a TCP/UDP connection is actually local blank87 Linux - Networking 8 07-17-2008 08:44 AM
wireless card udp sendto() question ggeorgak Programming 1 02-11-2007 10:26 AM
how to stop a connection to a specific UDP/TCP port? aromes Linux - Networking 2 03-04-2004 07:37 PM


All times are GMT -5. The time now is 01:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration