mirror of
https://github.com/debauchee/barrier.git
synced 2026-07-17 11:31:35 +08:00
refactored ISocket into IDataSocket. the latter and IListenSocket
now derive from ISocket.
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
#include "IInterface.h"
|
||||
|
||||
class CNetworkAddress;
|
||||
class IInputStream;
|
||||
class IOutputStream;
|
||||
|
||||
class ISocket : public IInterface {
|
||||
public:
|
||||
@@ -14,18 +12,10 @@ public:
|
||||
// bind the socket to a particular address
|
||||
virtual void bind(const CNetworkAddress&) = 0;
|
||||
|
||||
// connect the socket
|
||||
virtual void connect(const CNetworkAddress&) = 0;
|
||||
|
||||
// close the socket. this will flush the output stream if it
|
||||
// hasn't been closed yet.
|
||||
virtual void close() = 0;
|
||||
|
||||
// get the input and output streams for the socket. closing
|
||||
// these streams closes the appropriate half of the socket.
|
||||
virtual IInputStream* getInputStream() = 0;
|
||||
virtual IOutputStream* getOutputStream() = 0;
|
||||
|
||||
// accessors
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user