summaryrefslogtreecommitdiff
path: root/comm
diff options
context:
space:
mode:
authorchatty1994-05-10 11:17:49 +0000
committerchatty1994-05-10 11:17:49 +0000
commita159d11a1f07c5e30fc8d120cd6f035b90e35d66 (patch)
treed47bf7d904576b40d5f08decad7dc586750f5e54 /comm
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')
-rw-r--r--comm/Stream.cc41
-rw-r--r--comm/Stream.h4
2 files changed, 8 insertions, 37 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;
-}
-
-
diff --git a/comm/Stream.h b/comm/Stream.h
index 3a4282d..a8c4a56 100644
--- a/comm/Stream.h
+++ b/comm/Stream.h
@@ -20,14 +20,12 @@
class UchStream : public UchSocket {
public:
- UchStream ();
- UchStream (UchAddress*, UchAddress*);
+ UchStream (UchAddress* = 0, UchAddress* = 0);
~UchStream ();
UchStream (const UchStream&);
UchChannel* Copy () const;
int SockType ();
int Listen (int = 5);
- UchSocket* SockAccept ();
};
#endif /* Stream_H_ */