2006-02-02 16:55:44 +01:00
|
|
|
#ifndef _MULTISOCK_H_
|
|
|
|
#define _MULTISOCK_H_
|
|
|
|
|
|
|
|
#include <net/if.h>
|
|
|
|
#include <netinet/in.h>
|
|
|
|
|
|
|
|
#include "config.h"
|
2006-03-05 02:28:19 +01:00
|
|
|
#include "netpkt.h"
|
|
|
|
#include "socket.h"
|
|
|
|
#include "list.h"
|
2006-02-02 16:55:44 +01:00
|
|
|
|
|
|
|
class MultiSock {
|
|
|
|
public:
|
|
|
|
MultiSock(Config& conf);
|
|
|
|
~MultiSock();
|
|
|
|
|
2006-03-05 02:28:19 +01:00
|
|
|
int sendto(NetPkt* pkt, struct sockaddr_in* dst = NULL);
|
|
|
|
NetPkt* recv();
|
2006-02-02 16:55:44 +01:00
|
|
|
|
|
|
|
protected:
|
|
|
|
MultiSock(const MultiSock& x);
|
|
|
|
MultiSock& operator=(const MultiSock& x);
|
|
|
|
|
|
|
|
private:
|
|
|
|
List<Socket> ifaceList;
|
|
|
|
fd_set fdsel;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _MULTISOCK_H_
|