Example of TCP CLIENT Socket
#include <iostream>
#include <string.h>
using namespace std;
#include <netlink/socket.h>
int main() {
cout << "\nEcho Client...";
cout.flush();
try {
char input[256];
input[255] = '\0';
while(strcmp(input, "exit")) {
cout << "\n--> ";
cin.getline(input, 255);
socket.
send(input, strlen(input) + 1);
}
}
cout <<
"\n***Error*** " << e.
what();
}
return 0;
}