cdev-1.7.2n

This commit is contained in:
2022-12-13 12:44:04 +01:00
commit b3b88fc333
1357 changed files with 338883 additions and 0 deletions

View File

@@ -0,0 +1,32 @@
#ifndef _CDEV_SOCKET_ACCEPTOR_H_
#define _CDEV_SOCKET_ACCEPTOR_H_
#include "cdevSocketStream.h"
class CDEV_REACTOR_API cdevSocketAcceptor : public cdevSocket
{
public:
cdevSocketAcceptor(void);
cdevSocketAcceptor(
const cdevAddr &addr,
int reuse_addr = 0,
int protocol_family = PF_INET,
int backlog = 5,
int protocol = 0);
int open(const cdevAddr &addr,
int reuse_addr = 0,
int protocol_family = PF_INET,
int backlog = 5,
int protocol = 0,
int reopen = 1);
int accept(
cdevSocketStream &new_stream,
cdevAddr *remote_addr=0) const;
private:
int getRemoteAddress(cdevAddr &) const;
};
#endif /* _CDEV_SOCKET_ACCEPTOR_H */