Skip to content

pifagor19-zz/qwamp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C++/Qt implementation of WAMP protocol

This small library is based on initial version of CppWAMP, but moved to the Qt world. An event loop from boost was replaced by Qt's event loop as well as all other boost components. For data exchange is used QVariant as an universal data type. Library depends on qmsgpack.

Usage:

QTcpSocket socket;
QWamp::Session *session;
QObject::connect(&socket, &QTcpSocket::connected, [&]() {

  session = new QWamp::Session(sessionName, socket, QWamp::Transport::MsgPack, true);

  QObject::connect(session, &QWamp::Session::joined, [&](qint64 s) {
    qDebug() << "Session joined to realm" << config.realm << "with session ID " << s;

    QVariant result = session->call("sum", { 4, 5, 6 });
    qDebug() << "Sum result is" << result.toInt();

  });

  QObject::connect(session, &QWamp::Session::started, [&]() {
    session->join("realm");
  });
});

Working example will be supplied later.

About

C++/Qt implementation of WAMP protocol (http://wamp-proto.org/)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.1%
  • QMake 0.9%