For whatever reason, IT department asked for it if possible. I used the following code but it doesn't seem to work.
.h
.cpp
m_pSocketClient->bind(Specified Address, Specified Port);
m_pSocketClient->connectToHost(Server Address, Server Port);
.h
QTcpSocket *m_pSocketClient;
.cpp
m_pSocketClient = new QTcpSocket(this);
m_pSocketClient->bind(Specified Address, Specified Port);
m_pSocketClient->connectToHost(Server Address, Server Port);
To copy to clipboard, switch view to plain text mode
It still uses a random port. What am I doing wrong?
Bookmarks