⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vdpmserversocket.hh

📁 penMesh is a generic and efficient data structure for representing and manipulating polygonal meshes
💻 HH
字号:
#ifndef OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSOCKET_HH
#define OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSOCKET_HH

#include <qobject.h>
#include <qsocket.h>
#include <qserversocket.h>
#include <qvbox.h>

#include <OpenMesh/Apps/VDProgMesh/Streaming/Server/VDPMServerSession.hh>
#include <OpenMesh/Tools/VDPM/StreamingDef.hh>
#include <iostream>


class VDPMServerSocket : public QServerSocket
{
  Q_OBJECT

public:

  VDPMServerSocket(QObject *parent=0)
    : QServerSocket(VDPM_STREAMING_PORT, 1, parent)
  {
    if (!ok())
    {
      std::cerr << "Failed to bind to port " 
		<< VDPM_STREAMING_PORT << std::endl;
      exit(1);
    }
  }

  void newConnection(int socket)
  {
    VDPMServerSession *s = new VDPMServerSession(socket, this);
    //s->set_vdpm();
    emit newConnect(s);
    std::cout << "new connection with: " << socket << std::endl;
  }

signals:

  void newConnect(VDPMServerSession*);

};



#endif //OPENMESH_APP_VDPMSTREAMING_SERVER_VDPMSERVERSOCKET_HH defined

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -