QSOCKET.ZIP

  • S5_277552
    了解作者
  • 1.5MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-18 03:51
    上传日期
包含有两个Demo程序,分别是基于Qt自己本身接口实现的UDP通信和TCP通信实例,Qt 提供的接口通信函数能与基于linux的socket通信函数相互通信,抛砖引玉
QSOCKET.ZIP
  • QSocket
  • Demo-QUdp
  • Demo-QUDP-client
  • Demo-QUDP-client.pro.user
    24KB
  • mainwindow.ui
    6.5KB
  • mainwindow.cpp
    1.5KB
  • main.cpp
    322B
  • mainwindow.h
    760B
  • Demo-QUDP-client.pro
    1.2KB
  • Demo-QUDP-server
  • mainwindow.ui
    21.4KB
  • Demo-QUDP-server.pro.user
    24KB
  • mainwindow.cpp
    1.5KB
  • main.cpp
    322B
  • mainwindow.h
    734B
  • Demo-QUDP-server.pro
    1.2KB
  • Demo-QTcp
  • Demo-QTcp-Server
  • mainwindow.ui
    6.9KB
  • mainwindow.cpp
    3.6KB
  • Demo-QTcp-Server.pro.user
    24KB
  • Demo-QTcp-Server.pro
    1.2KB
  • main.cpp
    302B
  • mainwindow.h
    1.1KB
  • Demo-QTcp-Client
  • mainwindow.ui
    6.9KB
  • mainwindow.cpp
    2.9KB
  • main.cpp
    302B
  • mainwindow.h
    1KB
  • Demo-QTcp-Client.pro
    1.2KB
  • Demo-QTcp-Client.pro.user
    24KB
  • build-Demo-QTcp-Client-Desktop_Qt_5_12_3_GCC_64bit-Debug
  • moc_mainwindow.cpp
    4.6KB
  • main.o
    477.5KB
  • Demo-QTcp-Client
    791.2KB
  • mainwindow.o
    840.8KB
  • moc_predefs.h
    8.2KB
  • .qmake.stash
    650B
  • Makefile
    73.4KB
  • moc_mainwindow.o
    504.1KB
  • ui_mainwindow.h
    11KB
  • build-Demo-QTcp-Server-Desktop_Qt_5_12_3_GCC_64bit-Debug
  • Demo-QTcp-Server
    791.6KB
  • moc_mainwindow.cpp
    4.8KB
  • main.o
    477.5KB
  • mainwindow.o
    842.8KB
  • moc_predefs.h
    8.2KB
  • .qmake.stash
    650B
  • Makefile
    74.5KB
  • moc_mainwindow.o
    504.7KB
  • ui_mainwindow.h
    11.1KB
内容介绍
/**************************************************************************** ** Meta object code from reading C++ file 'mainwindow.h' ** ** Created by: The Qt Meta Object Compiler version 67 (Qt 5.12.3) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../Demo-QTcp-Server/mainwindow.h" #include <QtCore/qbytearray.h> #include <QtCore/qmetatype.h> #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'mainwindow.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 67 #error "This file was generated using the moc from 5.12.3. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE QT_WARNING_PUSH QT_WARNING_DISABLE_DEPRECATED struct qt_meta_stringdata_MainWindow_t { QByteArrayData data[10]; char stringdata0[201]; }; #define QT_MOC_LITERAL(idx, ofs, len) \ Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET(len, \ qptrdiff(offsetof(qt_meta_stringdata_MainWindow_t, stringdata0) + ofs \ - idx * sizeof(QByteArrayData)) \ ) static const qt_meta_stringdata_MainWindow_t qt_meta_stringdata_MainWindow = { { QT_MOC_LITERAL(0, 0, 10), // "MainWindow" QT_MOC_LITERAL(1, 11, 15), // "onNewConnection" QT_MOC_LITERAL(2, 27, 0), // "" QT_MOC_LITERAL(3, 28, 17), // "onClientConnected" QT_MOC_LITERAL(4, 46, 20), // "onClientDisConnected" QT_MOC_LITERAL(5, 67, 15), // "onSocketRecvMsg" QT_MOC_LITERAL(6, 83, 31), // "on_pushButton_StrListen_clicked" QT_MOC_LITERAL(7, 115, 31), // "on_pushButton_StpListen_clicked" QT_MOC_LITERAL(8, 147, 26), // "on_pushButton_Send_clicked" QT_MOC_LITERAL(9, 174, 26) // "on_pushButton_Exit_clicked" }, "MainWindow\0onNewConnection\0\0" "onClientConnected\0onClientDisConnected\0" "onSocketRecvMsg\0on_pushButton_StrListen_clicked\0" "on_pushButton_StpListen_clicked\0" "on_pushButton_Send_clicked\0" "on_pushButton_Exit_clicked" }; #undef QT_MOC_LITERAL static const uint qt_meta_data_MainWindow[] = { // content: 8, // revision 0, // classname 0, 0, // classinfo 8, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount // slots: name, argc, parameters, tag, flags 1, 0, 54, 2, 0x08 /* Private */, 3, 0, 55, 2, 0x08 /* Private */, 4, 0, 56, 2, 0x08 /* Private */, 5, 0, 57, 2, 0x08 /* Private */, 6, 0, 58, 2, 0x08 /* Private */, 7, 0, 59, 2, 0x08 /* Private */, 8, 0, 60, 2, 0x08 /* Private */, 9, 0, 61, 2, 0x08 /* Private */, // slots: parameters QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, QMetaType::Void, 0 // eod }; void MainWindow::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { auto *_t = static_cast<MainWindow *>(_o); Q_UNUSED(_t) switch (_id) { case 0: _t->onNewConnection(); break; case 1: _t->onClientConnected(); break; case 2: _t->onClientDisConnected(); break; case 3: _t->onSocketRecvMsg(); break; case 4: _t->on_pushButton_StrListen_clicked(); break; case 5: _t->on_pushButton_StpListen_clicked(); break; case 6: _t->on_pushButton_Send_clicked(); break; case 7: _t->on_pushButton_Exit_clicked(); break; default: ; } } Q_UNUSED(_a); } QT_INIT_METAOBJECT const QMetaObject MainWindow::staticMetaObject = { { &QMainWindow::staticMetaObject, qt_meta_stringdata_MainWindow.data, qt_meta_data_MainWindow, qt_static_metacall, nullptr, nullptr } }; const QMetaObject *MainWindow::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject() : &staticMetaObject; } void *MainWindow::qt_metacast(const char *_clname) { if (!_clname) return nullptr; if (!strcmp(_clname, qt_meta_stringdata_MainWindow.stringdata0)) return static_cast<void*>(this); return QMainWindow::qt_metacast(_clname); } int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 8) qt_static_metacall(this, _c, _id, _a); _id -= 8; } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) { if (_id < 8) *reinterpret_cast<int*>(_a[0]) = -1; _id -= 8; } return _id; } QT_WARNING_POP QT_END_MOC_NAMESPACE
评论
    相关推荐