[Qt-interest] WG: QT Assistant and ports
Lodron, Gerald
Gerald.Lodron at joanneum.at
Tue Mar 22 09:03:06 CET 2011
I checked it several times, i defenitely do not make a second connection. As i said, everythings work prior the opening of assistant.exe
Here my code:
try{
if (mSocket != NULL){
delete mSocket;
mSocket = NULL;
}
sockinetbuf sin (sockbuf::sock_stream);
try
{
sin.bind( mInfo.GetCalledIPPort() ); //does not work on assistant.exe, mInfo.GetCalledIPPort() is the port adress
}
catch(sockerr &e)
{
std::cout << e.what() << ": " <<e.operation() << std::endl;
std::cout << "Error code: " << WSAGetLastError() << std::endl; //here i get 10048
sin.shutdown(sockbuf::shut_readwrite);
return false;
}
sin.recvtimeout(1);
sin.sendtimeout(1);
sin.listen();
if (sin.is_readready(1, 0))
{
mSocket = new iosockinet(sin.accept());
}
else
{
return false; //no connection here, so have to initialize later.
}
} catch (std::exception& ex){//unable to establish connection, so break off.
return false;
}
________________________________
Von: qt-interest-bounces+gerald.lodron=joanneum.at at qt.nokia.com [mailto:qt-interest-bounces+gerald.lodron=joanneum.at at qt.nokia.com] Im Auftrag von Anton Chernov
Gesendet: Montag, 21. März 2011 13:32
An: Andre Somers
Cc: qt-interest at trolltech.com
Betreff: Re: [Qt-interest] WG: QT Assistant and ports
Or check carefully that you don't make the connection twice.
2011/3/21 Andre Somers <andre at familiesomers.nl>
Op Ma, 21 maart, 2011 11:55 am, schreef Lodron, Gerald:
>
> Can noone give me a hint?
Did you check if, by pure accident, QtAssistant doesn't want to just use
the exact same port you are using?
André
>
>
> ________________________________
> Von: qt-interest-bounces+gerald.lodron=joanneum.at at qt.nokia.com
> [mailto:qt-interest-bounces+gerald.lodron <mailto:qt-interest-bounces%2Bgerald.lodron> =joanneum.at at qt.nokia.com] Im
> Auftrag von Lodron, Gerald
> Gesendet: Dienstag, 8. März 2011 07:09
> An: 'qt-interest at trolltech.com'
> Betreff: [Qt-interest] QT Assistant and ports
>
>
> Hi
>
> I am currently developing a program which uses the WinSock API for netwerk
> connections and QTAssistant as help viewer. My program is continuously
> listening on a specific port and does something when it gets something
> received whereby the connection has a timeout of 1 second and is then
> reinitialized in and endless loop.
>
> The stuff works but when i start the QTAssistant i cannot open ANY ports
> any more, the WinSock bind function fails with error code 10048 which
> means that address is already in use. What the hell is QTAssistant doing?
> Does it collect all available ports?
>
> Best regards
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
_______________________________________________
Qt-interest mailing list
Qt-interest at qt.nokia.com
http://lists.qt.nokia.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list