tcpface.h
来自「一个语言识别引擎」· C头文件 代码 · 共 54 行
H
54 行
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
/*
* Copyright (C) 2006 Paul Fitzpatrick
* CopyPolicy: Released under the terms of the GNU GPL v2.0.
*
*/
#ifndef _YARP2_TCPFACE_
#define _YARP2_TCPFACE_
#include <yarp/Face.h>
//#include <yarp/Semaphore.h>
#include <ace/config.h>
#include <ace/SOCK_Acceptor.h>
#include <ace/SOCK_Connector.h>
#include <ace/SOCK_Stream.h>
#include <ace/Log_Msg.h>
namespace yarp {
class TcpFace;
}
/**
* Communicating with a port via TCP.
*/
class yarp::TcpFace : public Face {
public:
TcpFace() { }
virtual ~TcpFace();
virtual void open(const Address& address); // throws IOException
virtual void close(); // throws IOException
virtual InputProtocol *read(); // throws IOException
virtual OutputProtocol *write(const Address& address); // throws IOException
/**
* This class like all classes except the port objects does
* not have any notion of running in a multi-threaded environment.
*
*/
private:
void closeFace();
Address address;
ACE_SOCK_Acceptor peerAcceptor;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?