Thanks alot. This really helps me in understanding the usage of sockets.
Type: Posts; User: akira87
Thanks alot. This really helps me in understanding the usage of sockets.
thanks. I will give it a try. btw, what do mean by man pages?
Thanks for the advice. I managed to run the codes. With regards to bind(), what's the purpose when we bind the broadcast ip to a port? And if I want to make the server to be capable of receiving...
The following is the code for the server:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
192.160.100.20:15600
Is the underlined number the port number? So meaning we just sent it to 192.160.100.255. This will be our broadcasting msg? We do not need to set the setting of socket using...
recv_numbytes = recvfrom(recvfd, &instruction, sizeof(instruction), 0, (struct sockaddr*)&ocu_addr, &recv_len);
printf("recv = %d\n", recv_numbytes);
//printf("sizeof pw = %d\n",...
Thanks guys... I managed to find the root of my program. But now I faced a segmentation fault upon running the codes. Do you have any reasons why it may cause this?
Thanks for the link. Is the link you provide suitable for linux OS? I met one problem while trying to run my program. My program is broadcasting data out to all the clients at the same so i would...
So meaning that if I happened to receive two clients trying to send me the data i will only manage to receive one?
yes. Thanks a lot. It helps me clear my doubts and can better plan my program. By the way, is it possible to use select() for UDP packets? From my understanding, I believe that we must register the...
May I know what's the difference between broadcast and multicast? I tried reading from the internet but I find it too technical and hard to understand. In addtition, if I am trying to broadcast data...
I managed to get the two network running. I finally understand what u meant about wired and wireless is the same. Thanks.
tentatively I am trying to pass data like simple strings or struct to test the effectiveness. However, eventually I may need to send video over the connection. So now, I was just trying to set up the...
Basically I am trying to write the codes for the server side that will be able to broadcast its IP address on a wireless network (most probably LAN), Then it must be able to multicast out to the...
Then how can I determine the IP address to send to (for client) and the IP address of the server? The wireless IP address or is it the one for the computer?
Hi, I am trying to write to write a wireless network in C. However, I am not sure how to initiate the wireless device to broadcast its IP and to multicast data out. Are there any books or website...