summaryrefslogtreecommitdiff
path: root/comm/Stream.cc
diff options
context:
space:
mode:
authorchatty1994-05-10 11:17:49 +0000
committerchatty1994-05-10 11:17:49 +0000
commita159d11a1f07c5e30fc8d120cd6f035b90e35d66 (patch)
treed47bf7d904576b40d5f08decad7dc586750f5e54 /comm/Stream.cc
parentd9e858f2c682937760595df6f62d8544806758e2 (diff)
downloadivy-league-a159d11a1f07c5e30fc8d120cd6f035b90e35d66.zip
ivy-league-a159d11a1f07c5e30fc8d120cd6f035b90e35d66.tar.gz
ivy-league-a159d11a1f07c5e30fc8d120cd6f035b90e35d66.tar.bz2
ivy-league-a159d11a1f07c5e30fc8d120cd6f035b90e35d66.tar.xz
Removed useless default constructor
Diffstat (limited to 'comm/Stream.cc')
-rw-r--r--comm/Stream.cc41
1 files changed, 7 insertions, 34 deletions
diff --git a/comm/Stream.cc b/comm/Stream.cc
index f03e298..16f6bc7 100644
--- a/comm/Stream.cc
+++ b/comm/Stream.cc
@@ -16,6 +16,12 @@
#include <stdlib.h>
#include <sys/socket.h>
+#ifdef __osf__
+extern "C" {
+ int listen (int, int);
+}
+#endif
+
/*?class UchStream
Streams implement reliable point to point connections.
UchStream connections do not keep the message boundaries:
@@ -37,14 +43,8 @@ and thus from \typ{UchChannel}, the virtual functions
\fun{HandleRead} and \fun{HandeWrite} can be used.
?*/
-/*?nextdoc?*/
-UchStream :: UchStream ()
-: UchSocket ()
-{
-}
-
/*?
-These constructors are similar to those of the class \typ{UchSocket}.
+This constructor is similar to that of the class \typ{UchSocket}.
?*/
UchStream :: UchStream (UchAddress* bound, UchAddress* connected)
: UchSocket (bound, connected)
@@ -95,30 +95,3 @@ UchStream :: Listen (int n)
return listen (FilDes (), n);
}
-/*?
-This function implements the Unix system call \fun{accept}.
-The stream socket is first set up (with \fun{Setup}), and then the system call is performed.
-A new dynamically created socket is returned, connected to the address returned by \fun{accept}.
-If the socket could not be set up or a system error occurred, 0 is returned.
-Note that in order to accept connections, the socket must be listen to,
-and thus an address must be bound to it.
-?*/
-UchSocket*
-UchStream :: SockAccept ()
-{
- GEN_ADDR addr;
- int alen = sizeof (addr);
- int fd;
-
- if (! Setup ())
- return (UchSocket*) 0;
-
- if ((fd = accept (FilDes (), &addr.sa, &alen)) < 0)
- return (UchSocket*) 0;
-
- UchSocket* s = new UchSocket (0, UchAddress::Decode (&addr, alen));
- s -> UchChannel :: Open (fd);
- return s;
-}
-
-