Luc@s
20-11-2003, 14:42
Dove canno????
#include <iostream>
#include <cstring>
#include <winsock2.h>
using namespace std;
int main(int argc, char * argv[])
{
sockaddr * in;
SOCKET s = socket(PF_INET,SOCK_STREAM,0);
int err = connect(s, in, strlen(argv[1]));
bind(s, in, strlen(argv[1]));
char * buf = new char[50];
char * se;
strcpy(se, "Culooooooo\n");
send(s, se, strlen(se), 0);
recv(s, buf, strlen(buf), 0);
closesocket(s);
return 0;
}
Tnk
#include <iostream>
#include <cstring>
#include <winsock2.h>
using namespace std;
int main(int argc, char * argv[])
{
sockaddr * in;
SOCKET s = socket(PF_INET,SOCK_STREAM,0);
int err = connect(s, in, strlen(argv[1]));
bind(s, in, strlen(argv[1]));
char * buf = new char[50];
char * se;
strcpy(se, "Culooooooo\n");
send(s, se, strlen(se), 0);
recv(s, buf, strlen(buf), 0);
closesocket(s);
return 0;
}
Tnk