rendered paste bodyirb(main):001:0> require 'Qt'
=> true
irb(main):002:0> qsd = Qt::SocketDevice.new
=> #<Qt::SocketDevice:0x2aaaabbafec0>
irb(main):003:0> qha = Qt::HostAddress.new
=> #<Qt::HostAddress:0x2aaaabba4688>
irb(main):004:0> qha.setAddress('127.0.0.1')
=> true
irb(main):005:0> qha
=> #<Qt::HostAddress:0x2aaaabba4688>
irb(main):006:0> qha.toString
=> "127.0.0.1"
irb(main):007:0> qsd.bind(qha, 0)
NoMethodError: undefined method `bind' for #<Qt::SocketDevice:0x2aaaabbafec0>
from (irb):7:in `method_missing'
from (irb):7
from :0
irb(main):008:0> qsd.connect(qha, 0)
NoMethodError: undefined method `connect' for #<Qt::SocketDevice:0x2aaaabbafec0>
from (irb):8:in `method_missing'
from (irb):8
from :0
irb(main):009:0> Qt.debug_level = Qt::DebugLevel::High
=> 2
irb(main):010:0> qsd.bind(qha, 0)
classname == QSocketDevice
:: method == bind
-> methodIds == [9579]
candidate list:
bool QSocketDevice::bind(const QHostAddress&, Q_UINT16) (9579)
matching => 9579
const QHostAddress& (QHostAddress)
Q_UINT16 (i)
match => 9579 score: -98
Possible prototypes:
void QSocketDevice::setAddressReusable(bool)
enum QSocketDevice::InternalError
enum QSocketDevice::ConnectionRefused
int QSocketDevice::socket() const
QIODevice::Offset QSocketDevice::size() const
QSocketDevice::Error QSocketDevice::error() const
bool QSocketDevice::bind(const QHostAddress&, Q_UINT16)
bool QSocketDevice::atEnd() const
int QSocketDevice::accept()
enum QSocketDevice::Datagram
void QSocketDevice::setBlocking(bool)
int QSocketDevice::sendBufferSize() const
QSocketDevice::Protocol QSocketDevice::protocol() const
void QSocketDevice::close()
void QSocketDevice::setSocket(int, QSocketDevice::Type)
QSocketDevice* QSocketDevice::QSocketDevice(QSocketDevice::Type, QSocketDevice::Protocol, int)
QSocketDevice::Type QSocketDevice::type() const
bool QSocketDevice::open(int)
bool QSocketDevice::connect(const QHostAddress&, Q_UINT16)
enum QSocketDevice::Stream
QSocketDevice* QSocketDevice::QSocketDevice(int, QSocketDevice::Type)
enum QSocketDevice::NoFiles
Q_LONG QSocketDevice::readBlock(char*, Q_ULONG)
int QSocketDevice::putch(int)
Q_UINT16 QSocketDevice::port() const
enum QSocketDevice::IPv4
void QSocketDevice::~QSocketDevice()
int QSocketDevice::ungetch(int)
void QSocketDevice::setReceiveBufferSize(uint)
bool QSocketDevice::at(QIODevice::Offset)
Q_LONG QSocketDevice::writeBlock(const char*, Q_ULONG)
void QSocketDevice::setSendBufferSize(uint)
Q_UINT16 QSocketDevice::peerPort() const
QHostAddress QSocketDevice::peerAddress() const
bool QSocketDevice::listen(int)
bool QSocketDevice::isValid() const
enum QSocketDevice::NoError
enum QSocketDevice::IPv6
Q_LONG QSocketDevice::writeBlock(const char*, Q_ULONG, const QHostAddress&, Q_UINT16)
void QSocketDevice::setError(QSocketDevice::Error)
int QSocketDevice::receiveBufferSize() const
void QSocketDevice::flush()
Q_LONG QSocketDevice::bytesAvailable() const
QIODevice::Offset QSocketDevice::at() const
enum QSocketDevice::UnknownError
QSocketDevice* QSocketDevice::QSocketDevice()
enum QSocketDevice::NoResources
Q_LONG QSocketDevice::waitForMore(int, bool*) const
Q_LONG QSocketDevice::waitForMore(int) const
int QSocketDevice::getch()
bool QSocketDevice::addressReusable() const
QHostAddress QSocketDevice::address() const
enum QSocketDevice::Inaccessible
enum QSocketDevice::Bug
bool QSocketDevice::blocking() const
enum QSocketDevice::Unknown
QSocketDevice* QSocketDevice::QSocketDevice(QSocketDevice::Type)
enum QSocketDevice::NetworkFailure
enum QSocketDevice::Impossible
enum QSocketDevice::AlreadyBound
setCurrentMethod()
NoMethodError: undefined method `bind' for #<Qt::SocketDevice:0x2aaaabbafec0>
from (irb):10:in `method_missing'
from (irb):10
from :0
irb(main):011:0> Q_UINT16
NameError: uninitialized constant Q_UINT16
from (irb):11
from :0