MCPcopy Create free account
hub / github.com/KangLin/RabbitRemoteControl / connectToHost

Method connectToHost

Plugins/Telnet/QTelnet.cpp:68–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68void QTelnet::connectToHost(const QString &host, quint16 port)
69{
70 if(!isConnected()) {
71 resetProtocol();
72 if(m_socketType == TCP) {
73 m_tcpSocket.abort();
74 m_tcpSocket.connectToHost(host, port, QAbstractSocket::ReadWrite, QAbstractSocket::AnyIPProtocol);
75 } else if(m_socketType == WEBSOCKET) {
76 m_webSocket.abort();
77 m_webSocket.open(QUrl("ws://"+host+":"+QString::number(port)));
78 } else if(m_socketType == SECUREWEBSOCKET) {
79 m_webSocket.abort();
80 m_webSocket.open(QUrl("wss://"+host+":"+QString::number(port)));
81 }
82 }
83}
84
85void QTelnet::disconnectFromHost(void)
86{

Callers 4

OnInitMethod · 0.80
StartMethod · 0.80
SocketInitMethod · 0.80
StartMethod · 0.80

Calls 1

openMethod · 0.45

Tested by

no test coverage detected