2001-10-06 14:13:28 +00:00
|
|
|
#ifndef ILISTENSOCKET_H
|
|
|
|
#define ILISTENSOCKET_H
|
|
|
|
|
|
|
|
#include "IInterface.h"
|
|
|
|
#include "XIO.h"
|
|
|
|
#include "XSocket.h"
|
|
|
|
|
|
|
|
class CNetworkAddress;
|
|
|
|
class ISocket;
|
|
|
|
|
|
|
|
class IListenSocket : public IInterface {
|
|
|
|
public:
|
|
|
|
// manipulators
|
|
|
|
|
|
|
|
// bind the socket to a particular address
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual void bind(const CNetworkAddress&) = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
// wait for a connection
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual ISocket* accept() = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
// close the socket
|
2001-10-14 16:58:01 +00:00
|
|
|
virtual void close() = 0;
|
2001-10-06 14:13:28 +00:00
|
|
|
|
|
|
|
// accessors
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|