基于Qt的TCP链接
来源:互联网 发布:ssh项目源码 编辑:程序博客网 时间:2024/06/03 21:04
#define CONNECT_HUD_SERVERS_ADDR "127.0.0.1"#define CONNECT_HUD_SERVERS_PORT 4333//HUD client_hud client_hud = new QTcpSocket(); client_hud->setParent(this); client_hud->connectToHost(CONNECT_HUD_SERVERS_ADDR, CONNECT_HUD_SERVERS_PORT); // local connect(client_hud, SIGNAL(connected()), this, SLOT(connHUDSuccess())); //connect(client_hud, SIGNAL(disconnected()), this, SLOT(disConnected())); client_hudCTL = new QTcpSocket(); client_hudCTL->setParent(this); client_hudCTL->connectToHost(CONNECT_HUD_SERVERS_ADDR, CONNECT_HUD_SERVERS_PORT+1); // local connect(client_hudCTL, SIGNAL(connected()), this, SLOT(connHUDSmallSuccess())); client_hudSmall = new QTcpSocket(); client_hudSmall->setParent(this); client_hudSmall->connectToHost(CONNECT_HUD_SERVERS_ADDR, CONNECT_HUD_SERVERS_PORT+2); // local connect(client_hudSmall, SIGNAL(connected()), this, SLOT(connHUDCTLSuccess()));
#define HOSTPORT 4333
socketData = new QTcpSocket(this); socketCtrl = new QTcpSocket(this); socketDataSmall = new QTcpSocket(this); server.setParent(this); server.listen(QHostAddress::Any,HOSTPORT); serverCTL.setParent(this); serverCTL.listen(QHostAddress::Any,HOSTPORT+1); serverSmall.setParent(this); serverSmall.listen(QHostAddress::Any,HOSTPORT+2); //connect(socketData,SIGNAL(connected()),this,SLOT(proEstablished())); connect(&server,SIGNAL(newConnection()),this,SLOT(proConnectRequest())); connect(&serverCTL,SIGNAL(newConnection()),this,SLOT(proConnectRequestCTL())); connect(&serverSmall,SIGNAL(newConnection()),this,SLOT(proConnectRequestSmall()));
0 0
- 基于Qt的TCP链接
- QT链接tcp-usb
- QT-基于TCP的网络通信
- [Qt] 基于Tcp协议的聊天室实现
- QT基于TCP的Socket编程
- Qt:基于TCP的多线程文件传输工具
- Qt---基于TCP聊天室
- 基于QT的TCP协议实现的通信小程序
- 基于QT的TCP协议实现的通信小程序
- 基于qt的一个tcp通信小程序
- 基于tcp和qt的简单聊天室搭建
- QT学习:基于TCP/IP的简易群聊系统
- TCP链接的状态
- Qt的静态链接
- Qt的一些链接
- 翻译QT基于TCP聊天室server
- 基于TCP的文件传输
- 基于TCP的文件传输
- 比较好的Python博客网址
- 【并查集】食物链
- C++之“拷贝构造函数”
- 《Java并发编程实战》- 个人阅读总结(一)
- Git – fatal: Unable to create ‘/.git/index.lock’: File exists错误解决办法
- 基于Qt的TCP链接
- (转)Android TextView背景色、圆角、内部填充设置
- 磁盘配额
- 算法复杂度分析
- Codeforces Round #400 (Div. 1 + Div. 2, combined) E. The Holmes Children
- Java中的ReentrantLock和synchronized两种锁定机制的对比
- 《Thinking in Java》学习笔记(1)
- NOIP 2016 普及组 复赛 pencil 买铅笔
- 深度学习(14):Control