CPN
Computational Process Networks
Main Page
Namespaces
Classes
Files
File List
File Members
include
cpn
remote_context
RemoteContext.h
Go to the documentation of this file.
1
//=============================================================================
2
// Computational Process Networks class library
3
// Copyright (C) 1997-2006 Gregory E. Allen and The University of Texas
4
//
5
// This library is free software; you can redistribute it and/or modify it
6
// under the terms of the GNU Library General Public License as published
7
// by the Free Software Foundation; either version 2 of the License, or
8
// (at your option) any later version.
9
//
10
// This library is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// Library General Public License for more details.
14
//
15
// The GNU Public License is available in the file LICENSE, or you
16
// can write to the Free Software Foundation, Inc., 59 Temple Place -
17
// Suite 330, Boston, MA 02111-1307, USA, or you can find it on the
18
// World Wide Web at http://www.fsf.org.
19
//=============================================================================
23
#ifndef REMOTECONTEXT_H
24
#define REMOTECONTEXT_H
25
#pragma once
26
#include <
cpn/common.h
>
27
#include <
cpn/remote_context/RemoteContextClient.h
>
28
#include <
cpn/io/SocketHandle.h
>
29
#include <memory>
30
31
class
Pthread
;
32
33
namespace
CPN {
37
class
CPN_API
RemoteContext
:
public
CPN::RemoteContextClient
{
38
public
:
39
RemoteContext
(
const
SocketAddress
&addr);
40
RemoteContext
(
const
SockAddrList
&addrs);
41
RemoteContext
(
int
fd);
42
~
RemoteContext
();
43
protected
:
44
void
SendMessage(
const
Variant &msg);
45
void
*EntryPoint();
46
private
:
47
void
EndWrite();
48
bool
IsEndWrite();
49
std::auto_ptr<Pthread>
thread
;
50
SocketHandle
sock
;
51
bool
endwrite
;
52
};
53
}
54
#endif
RemoteContextClient.h
CPN::RemoteContext::sock
SocketHandle sock
Definition:
RemoteContext.h:50
CPN::RemoteContext
Definition:
RemoteContext.h:37
Pthread
Definition:
PthreadLib.h:56
CPN::RemoteContextClient
This abstract class is the remote context client.
Definition:
RemoteContextClient.h:48
SocketAddress
An abstraction of a socket address with convenience methods.
Definition:
SocketAddress.h:42
SocketHandle
A FileHandle customized with some socket specific functionality and functions.
Definition:
SocketHandle.h:34
CPN::RemoteContext::thread
std::auto_ptr< Pthread > thread
Definition:
RemoteContext.h:49
CPN::RemoteContext::endwrite
bool endwrite
Definition:
RemoteContext.h:51
SocketHandle.h
common.h
SockAddrList
std::vector< SocketAddress > SockAddrList
Definition:
SocketAddress.h:35
CPN_API
#define CPN_API
Definition:
common.h:36
Generated by
1.8.5