Implements the IRC protocol and provides means for implementing support for custom protocols.
More...
Inherits QObject.
- Since
- 3.2
- See also
- IrcConnection::protocol
◆ IrcProtocol()
Constructs a new IRC protocol for connection.
◆ ~IrcProtocol()
IrcProtocol::~IrcProtocol |
( |
| ) |
|
|
override |
Destructs the IRC protocol.
◆ close()
void IrcProtocol::close |
( |
| ) |
|
|
virtual |
This method is called when the connection has been lost.
◆ connection()
This property holds the connection.
- Access function:
-
◆ open()
void IrcProtocol::open |
( |
| ) |
|
|
virtual |
This method is called when the connection has been established.
The default implementation sends the NICK
, USER
and PASSWORD
commands as defined in RFC 1459.
Furthermore, it sends a CAP LS
command as specified in IRC Client Capabilities Extension.
◆ read()
void IrcProtocol::read |
( |
| ) |
|
|
virtual |
This method is called when the socket has new data available for read.
The default implementation reads lines as specified in RFC 1459.
- See also
- socket
◆ receiveMessage
void IrcProtocol::receiveMessage |
( |
IrcMessage * |
message | ) |
|
|
slot |
◆ setActiveCapabilities
void IrcProtocol::setActiveCapabilities |
( |
const QSet< QString > & |
capabilities | ) |
|
|
protectedslot |
This method should be called by the protocol implementation to notify the underlying IRC network about a change in active capabilities.
- See also
- IrcNetwork::activeCapabilities
◆ setAvailableCapabilities
void IrcProtocol::setAvailableCapabilities |
( |
const QSet< QString > & |
capabilities | ) |
|
|
protectedslot |
This method should be called by the protocol implementation to notify the underlying IRC network about a change in available capabilities.
- See also
- IrcNetwork::availableCapabilities
◆ setInfo
void IrcProtocol::setInfo |
( |
const QHash< QString, QString > & |
info | ) |
|
|
protectedslot |
This method should be called by the protocol implementation to initialize the underlying IRC network connection info.
- See also
- IrcNetwork::initialized
◆ setNickName
void IrcProtocol::setNickName |
( |
const QString & |
name | ) |
|
|
protectedslot |
This method should be called by the protocol implementation to notify the underlying IRC connection about a nick name change.
- See also
- IrcConnection::nickName
◆ setStatus
This method should be called by the protocol implementation to notify the underlying IRC connection about a status change.
- See also
- IrcConnection::status
◆ socket()
QAbstractSocket * IrcProtocol::socket |
( |
| ) |
const |
This property holds the socket.
- Access functions:
- QAbstractSocket* socket() const
◆ write()
bool IrcProtocol::write |
( |
const QByteArray & |
data | ) |
|
|
virtual |
This method is called when raw data should be written to the socket.
The default implementation writes the data and appends "\r\n"
as specified in RFC 1459.
- See also
- socket