this is my first attempt on writing a winsock program
its pretty cool i always thought it was gonna be harder but it seems really easy
anyway its only a simple "hello world" program
my problem is i cant figure out a way to connect to a user
actually STAY connected with telnet when i run it.
i want to use connect() to establish a connection with the user
ive seen somewhere they used something like LPHOSTENT host
but my problem is i want to connect to address instead of doing that
here is the code
sockVersion = MAKEWORD(2, 0);
SOCKET sock,usersocket, consock;
struct sockaddr_in insocket;
memset(&(insocket.sin_zero), '\0', 8);
int bin=bind(sock,(struct sockaddr*)&insocket,sizeof(struct sockaddr));
char *text="pode was here";
ok=connect(consock,(struct sockaddr *)&insocket,sizeof(struct sockaddr)); // here is were my problem is
Have a look at Beej's Guide.
i looked around a bit
i got a feeling that im totally in the wrong way
Is it even possible to connect to telnet?
or even request something?
Is your code (above) for a client or a server? What exactly are you trying to build again?