how to do udp broadcast with multithreading


 
Thread Tools Search this Thread
Special Forums IP Networking how to do udp broadcast with multithreading
# 1  
Old 05-20-2011
how to do udp broadcast with multithreading

hello to all
i want to use multithreading to my UDP broadcast server client program. will anyone help me by proving C code. i am working in fedora. also my requirement is POSIX compliance.please help me.....
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Programming

Help with multithreading

I take this question of the The Linux Programming Interface: A Linux and Unix System Programming page 652 exercise 30.1 I want someone to explain the under line statement because it sounds complex to me couldn't understand anything 30-1 Modify the program (thread_incr.c) so that each loop in... (3 Replies)
Discussion started by: fwrlfo
3 Replies

2. Shell Programming and Scripting

Nc won't send udp broadcast!?

Greetings, I want to send broadcast udp from a script. This works but is not broadcast: echo -n "this is my message\r\n" | nc -u 192.168.0.12 5100 The broadcast version does not work: echo -n "this is my message\r\n" | nc -u 192.168.0.255 5100 Suggestions on the right way to do this... (2 Replies)
Discussion started by: anotherstevest
2 Replies

3. Programming

how to do udp broadcast with multithreading

hello to all i want to use multithreading to my UDP broadcast server client program. will anyone help me by proving C code. i am working in fedora. also my requirement is POSIX compliance.please help me..... (6 Replies)
Discussion started by: moti12
6 Replies

4. Programming

MultiThreading using Pthreads

Situation: i have multiple pthread_create calls like this: pthread_create(...., ThreadFunc1,.....); pthread_create(...., ThreadFunc2,.....); . . which i am using to create multiple threads.All the "ThreadFunc<i>" functions are actually calling same function "Receive" of a class using same... (3 Replies)
Discussion started by: Sastra
3 Replies

5. Shell Programming and Scripting

Multithreading program

Hi I need to insert 1million records into MySQL database, but it is taking lot of time as there is no bulk insert support. I want to spawn 10 processes which will insert 100k records each parallely. Can somebody help me with a example program to execute this task through shell scripting. (5 Replies)
Discussion started by: sach_roger
5 Replies

6. UNIX for Advanced & Expert Users

Why UDP broadcast don't run?

I use FreeBSD7.0, I want to use UDP broadcast,my code is following: /*udpcli01.c*/ int main(int argc, char **argv) { int sockfd; struct sockaddr_in servaddr; if (argc != 2) err_quit("usage: udpcli <IPaddress>"); bzero(&servaddr, sizeof(servaddr)); servaddr.sin_family = AF_INET;... (2 Replies)
Discussion started by: konvalo
2 Replies

7. UNIX for Advanced & Expert Users

multithreading in UNIX

Hi, Can you please give me a suitable reference to learn multithreading programming in C in UNIX? Thanks (3 Replies)
Discussion started by: naan
3 Replies

8. Programming

multithreading on OSX

Hi all, I have a query about multithreading. What I would like to do is, at the start of my main update() function, start a couple of threads in parallel, once they are all complete carry on with my main update function. void update() { thread1->update(); // fluid solver ... (3 Replies)
Discussion started by: memoid
3 Replies

9. Programming

Multithreading in Pro*C

:confused: Hi! I have created a Multhreaded Application in Pro*C (using pthreads) with about 5 Threads running simultaneously. The Application is basically to Update a Centralized Table in Oracle, which updates different rows in the Table (Each Thread updates different rows!). The... (16 Replies)
Discussion started by: shaik786
16 Replies
Login or Register to Ask a Question
udp(7)							 Miscellaneous Information Manual						    udp(7)

NAME
udp - Internet user datagram protocol (UDP) SYNOPSIS
#include <sys/socket.h> #include <netinet/in.h> The following is the socket call for AF_INET sockets: s = socket(AF_INET, SOCK_DGRAM, 0); The following is the socket call for AF_INET6 sockets: s = socket(AF_INET6, SOCK_DGRAM, 0); DESCRIPTION
UDP is a simple, unreliable datagram protocol that is used to support the SOCK_DGRAM abstraction for the Internet Protocol family. UDP sockets are connectionless, and are normally used with the sendto() and recvfrom() functions, though the connect() function may also be used to fix the destination for future packets, in which case the recv() or read() and send() or write() functions may be used. UDP address formats are identical to those used by TCP. In particular, UDP provides a port identifier in addition to the normal Internet address format. Note that the UDP port space is separate from the TCP port space (that is, a UDP port may not be "connected" to a TCP port). In addition, IPv4 broadcast packets may be sent (assuming the underlying network supports this) by using a reserved "broadcast address"; this address is network interface dependent. There is no broadcast address in IPv6. Options at the IP transport level may be used with UDP; see the ip() reference page. ERRORS
If a socket operation fails, errno may be set to one of the following values: An attempt was made to create a socket with a port that has already been allocated. An attempt was made to create a socket with a network address for which no network interface exists. The socket is already connected. This error occurs when trying to establish connection on a socket or when trying to send a datagram with the desti- nation address specified. The system ran out of memory for an internal data structure. The destination address of a datagram was not specified, and the socket has not been connected. RELATED INFORMATION
Functions: getsockopt(2), recv(2), send(2), socket(2) Files: netintro(7), inet(7), ip(7) delim off udp(7)