How do I send data to an IP address?
How do I send data to an IP address?
Read this -> Beej's Guide to Network Programming
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
The entire guide?
and ty
[Edited] I cant really find it out
Last edited by oods1; 01-13-2021 at 01:03 PM.
(fake IP)Code:info = inet_addr("33.333.333.338");
I'm using this code, I was told I need a few codes before it for it to work
Can anyone tell me the code
Last edited by oods1; 01-13-2021 at 02:12 PM.
Sure, go and read the tutorial again (several times).
This isn't some cake walk.
Everything is hard work in C.
Expect to spend a few days getting to grips with this, not a few hours.
If you want to do something quick in 5 lines, use Python or something.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
Ordinary language is totally unsuited for expressing what physics really asserts.
Only mathematics can say as little as the physicist means to say. - Bertrand Russell
I have checked the entire tutorial, to send data to an IP address is not there.
Just a wild guess, but the "send() and recv()—Talk to me, baby!" section might have something to do with sending data to (and receiving data from) an IP address.
are we talking about the same tutorial?
C Tutorial - Learn C - Cprogramming.com
I got this but it don't work
Code:send(int1 = inet_addr("33.333.333.333"));
Last edited by oods1; 01-13-2021 at 05:10 PM.
Ordinary language is totally unsuited for expressing what physics really asserts.
Only mathematics can say as little as the physicist means to say. - Bertrand Russell
oods1, do you have a computer programming background, and are you familiar with the C programming language?
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
On the contrary, you do have to declare variables before assigning to them (or from them, for that matter).Originally Posted by oods1
Anyway, the reason why john.c is facepalming so hard is that the tutorial that Salem was referring to was Beej's Guide to Network Programming. That will guide you towards understanding how to do the sort of network programming that you're looking to do.
Having said that, since you obviously do not know C programming, the cprogramming.com tutorial on learning C is appropriate too, but of course it will not answer "How do I send data to an IP address?", but it will give you the tools so that you can use more successfully peruse the networking programming tutorial. Hence, it would be a good place to start, i.e., you're going to have to put your network programming ambitions on hold for awhile.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)