connectToHost() resets local port number specified by bind
hello!
I try to connect to a server as tcp from client and bind(enter the port for the client), but after I connect to the host (used connecttoHost() method ) in the client
the port changed.
QT client:
there is any method or approach to make the port for the client fix ??
Re: connectToHost() resets local port number specified by bind
The client always uses a dynamically chosen TCP port. Why would you want to fix it?
Re: connectToHost() resets local port number specified by bind
I'm implementing chat application and I want from client to be able to enter the port for him from textedit
Re: connectToHost() resets local port number specified by bind
Why would a user want that? It is entirely irrelevant to the functionality they consume (chatting).
Cheers,
_
Re: connectToHost() resets local port number specified by bind
You're right.
However,I need the client enter port to bind UDP connect,but I used the tcp to send the online client.It was my error I tried used the same port for tcp_socket and udp_socket.
thanks a lot!:)