well here is all the code and there is nothing in the socket the error is in the connect
CODE
#include<iostream.h>
#include<winsock.h>
#include<stdio.h>
#pragma comment(lib, "wsock32.lib" )
#define silk_IP "121.128.133.64"
#define silk_PORT 15779
int main()
{
/*-------------------some first shit nonsense---------*/
WSADATA wsaData;
if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0) {
fprintf(stderr, "WSAStartup failed.\n");
exit(1);
}
/*----------------------now the bot--------------------*/
int nuconnector;
int x;
struct sockaddr_in silkroad;
nuconnector = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); //making the socket //maybe raw
if (nuconnector < 0)
{
cout<<"cannot establish connection socket creation error"<<endl;
cin>>x;
return 0;
}
else
{
cout<<"socket created.."<<endl;
}
silkroad.sin_family = PF_INET;
silkroad.sin_port = htons (silk_PORT);
silkroad.sin_addr.s_addr = inet_addr(silk_IP);
memset(silkroad.sin_zero, '\0', sizeof silkroad.sin_zero);
int chk = connect(nuconnector,(struct sockaddr *)&silkroad,sizeof silkroad);
if(chk=-1)
{
cout<<"could not connect"<<endl;
cin>>x;
}
else
{
cout<<"u have connected to silkroad /gg"<<endl;
cin>>x;
}
}