Answer the question
In order to leave comments, you need to log in
How to connect to tcp server via raw sockets in Linux using Qt?
Hello! You need to write a client to communicate with a tcp server. I use raw sockets, because the standard qt's sockets did not want to start on the computer where the program will be used.
The whole project is written in Qt, only networking is in raw sockets.
I use this page as an example of working with raw sockets :
everything would be fine, but Qt swears at this line:
//Connect to remote server
if ( connect(socket_desc , (struct sockaddr *)&server , sizeof(server)) < 0)
Answer the question
In order to leave comments, you need to log in
if ( ::connect(socket_desc , (struct sockaddr *)&server , sizeof(server)) < 0)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question