LinHES Forums
http://forums.linhes.org/

QServerSocket Question(IPv6)
http://forums.linhes.org/viewtopic.php?f=17&t=22545
Page 1 of 1

Author:  Alvin [ Wed Mar 21, 2012 3:27 am ]
Post subject:  QServerSocket Question(IPv6)

Hi, Everyone

I hope you can help.
I am testing using Linux and Qt.
It is the check using IPv6.

The version is as follows.
Linux : 2.6.18
Qt : 3.3

< tested by IPv4 >
The result was OK.
Code:
Server::Server( QObject* parent ) : QServerSocket(QHostAddress("0.0.0.1"), 30000, 1, parent)

The result of netstat.
> Proto Recv-Q Send-Q Local Address Foreign Address State
> tcp 0 0 0.0.0.0:30000 0.0.0.0:* LISTEN


< tested by IPv6 >
The result of IPv6 was NG.
It was not able to open the specified port.
Source code.
Code:
Server::Server( QObject* parent ) : QServerSocket(QHostAddress("2002:1:1:1:1:1:1:350"), 30000, 1, parent)

The result of netstat
> The specified IP address and port was not displayed.

The QServerSocket::ok was returns "false".
And error messages are following:
> QServerSocket: failed to bind or listen to the socket

I would like to perform connection which used IPv6 in this environment.


Does anyone know?

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/