Click here to Skip to main content
15,889,813 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello, I want to send a packet or a string over the internet in C,
and most of my questions that i have asked on diffrent forum just don't really help,
so i have used something from a webpage that maybe can help ppl help me.

You can download the file:
Here[^]

And the place i found it on:
Here[^]

What I have tried:

in the download file i tried to use the udp-send.c Becuse i want to send something over the internet so that can only be the logical thing.

The Error it have me:

udp-send.c: In function ‘int main()’:
udp-send.c:26:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
  char *server = "xxx.xx.xx.xx"; /* change this to use a different server */
                 ^
udp-send.c:53:41: error: ‘inet_aton’ was not declared in this scope
  if (inet_aton(server, &remaddr.sin_addr)==0) {
                                         ^
udp-send.c:66:10: error: ‘close’ was not declared in this scope
  close(fd);
          ^
Posted
Updated 20-May-16 22:22pm

1 solution

You already posted this question at How do I use UDP sockets in C [LINUX][^] and received feedback. Please do not repost.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900