summaryrefslogtreecommitdiff
path: root/ace/ACE.i
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-10-21 21:41:34 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1996-10-21 21:41:34 +0000
commita5fdebc5f6375078ec1763850a4ca23ec7fe6458 (patch)
treebcf0a25c3d45a209a6e3ac37b233a4812f29c732 /ace/ACE.i
downloadATCD-a5fdebc5f6375078ec1763850a4ca23ec7fe6458.tar.gz
Initial revision
Diffstat (limited to 'ace/ACE.i')
-rw-r--r--ace/ACE.i61
1 files changed, 61 insertions, 0 deletions
diff --git a/ace/ACE.i b/ace/ACE.i
new file mode 100644
index 00000000000..c8467a5cde9
--- /dev/null
+++ b/ace/ACE.i
@@ -0,0 +1,61 @@
+/* -*- C++ -*- */
+// $Id$
+
+// ACE.i
+#include "ace/Log_Msg.h"
+
+// Miscellaneous static methods used throughout ACE.
+
+inline ssize_t
+ACE::send (ACE_HANDLE handle, const void *buf, size_t len)
+{
+ ACE_TRACE ("ACE::send");
+
+#if defined (ACE_WIN32)
+ return ACE_OS::send (handle, (const char *) buf, len);
+#elif defined (VXWORKS)
+ return ::write (handle, (char *) buf, len);
+#else
+ return ::write (handle, (const char *) buf, len);
+#endif /* ACE_WIN32 */
+}
+
+inline ssize_t
+ACE::send (ACE_HANDLE handle, const void *buf, size_t len, int flags)
+{
+ ACE_TRACE ("ACE::send");
+ return ACE_OS::send (handle, (const char *) buf, len, flags);
+}
+
+inline ssize_t
+ACE::recv (ACE_HANDLE handle, void *buf, size_t len)
+{
+ ACE_TRACE ("ACE::recv");
+#if defined (ACE_WIN32)
+ return ACE_OS::recv (handle, (char *) buf, len);
+#else
+ return ACE_OS::read (handle, (char *) buf, len);
+#endif /* ACE_WIN32 */
+}
+
+inline ssize_t
+ACE::recv (ACE_HANDLE handle, void *buf, size_t len, int flags)
+{
+ ACE_TRACE ("ACE::recv");
+
+ return ACE_OS::recv (handle, (char *) buf, len, flags);
+}
+
+inline char *
+ACE::strecpy (char *s, const char *t)
+{
+ ACE_TRACE ("ACE::strecpy");
+ register char *dscan = s;
+ register const char *sscan = t;
+
+ while ((*dscan++ = *sscan++) != '\0')
+ continue;
+
+ return dscan - 1;
+}
+