socket = new QSocket(this); connect(socket, SIGNAL(connected()), SLOT(slotConnected())); connect(socket, SIGNAL(error(int)), SLOT(slotError(int))); connect(socket, SIGNAL(readyRead()), SLOT(slotReadyRead())); socket->connectToHost("192.168.100.69", 15000);
int sock;struct sockaddr_in server = {AF_INET, 15000};server.sin_addr.s_addr = inet_addr("192.168.100.69");if( (sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) printf("\n ERR SOCKET\n");if(connect(sock, (struct sockaddr *)&server, sizeof(struct sockaddr_in)) == -1) printf("\n ERR SERVER\n");
telnet 192.168.100.69 15000
[color=navy]telnet 192.168.100.69 15000[/color]
Trying 192.168.100.69...telnet: connect to address 192.168.100.69: Connection refused
ping 192.168.100.69
telnet 192.168.100.69 80