Hello
I read three books about sockets but I just don't understand them.
This is what I know after reading those books:
-That you can compare sockets with a phone call (getting the phone number, dig in the number, accepting the call,...)
-That you can shutdown the connection on different ways (0,1,2)
-That the first variable must be the same in those function (socket id)
-You have to include two libraries (sys/socket.h & sys/types.h)
But that's it!
I still don't know how to make a good normal connection to something.
Could someone please make a very basic code to connect to a
FTP-server and/or Proxy?
1 2 3 4 5 6 7 8
|
#include <iostream>
#include <sys/socket.h>
#include <sys/types.h>
using namespace std;
int main() {
//And then?
}
|
I'd really appreciate to see an example of how to do it (I'm NOT copy/pasting), but I don't get anything from those books. :/
Thanks for reading,
Niely