aboutsummaryrefslogtreecommitdiff
path: root/src/portal.hh
diff options
context:
space:
mode:
authorschnetter <schnetter@83718e91-0e4f-0410-abf4-91180603181f>2005-06-03 12:46:23 +0000
committerschnetter <schnetter@83718e91-0e4f-0410-abf4-91180603181f>2005-06-03 12:46:23 +0000
commitaaa4ad68fa305c5103df0b632edec573cbfe4d4a (patch)
tree371ff3642d14571e14cb9d671c4ed7455ae39bc7 /src/portal.hh
parent1e1ad189405f1f99ecf659bf107249aac5b823af (diff)
Do not mess with sockets in C or C++. Defer this to perl. Create a
perl script at run time, pass the data it, and call it. git-svn-id: http://svn.cactuscode.org/arrangements/CactusUtils/Formaline/trunk@36 83718e91-0e4f-0410-abf4-91180603181f
Diffstat (limited to 'src/portal.hh')
-rw-r--r--src/portal.hh57
1 files changed, 3 insertions, 54 deletions
diff --git a/src/portal.hh b/src/portal.hh
index c6237a7..a91fa6d 100644
--- a/src/portal.hh
+++ b/src/portal.hh
@@ -3,53 +3,9 @@
#ifndef FORMALINE_PORTAL_HH
#define FORMALINE_PORTAL_HH
-
-
#include <sstream>
#include <string>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-# include <sys/time.h>
-#endif
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-# include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-#ifdef HAVE_NETDB_H
-# include <netdb.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-# include <arpa/inet.h>
-#endif
-#ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-#endif
-#include <errno.h>
-
-#ifndef SOCKET
-# define SOCKET int
-#endif
-
-#ifdef SOCKET_ERROR
-# define ERROR_CHECK(a) ((a) == SOCKET_ERROR)
-#else
-# define ERROR_CHECK(a) ((a) < 0)
-#endif
-
-#ifdef HAVE_WINSOCK2_H
-# define CLOSESOCKET(a) closesocket(a)
-#else
-# define CLOSESOCKET(a) close(a)
-#endif
-
#include "storage.hh"
@@ -61,13 +17,9 @@ namespace Formaline
class portal : public storage
{
-
- SOCKET sock;
-
+
std::ostringstream msgbuf;
-
- int errorcount;
-
+
public:
portal (char const * id,
@@ -93,10 +45,7 @@ namespace Formaline
char const * value);
private:
-
- void
- write (std::string const & msg);
-
+
std::string
clean (std::string const & txt)
const;