- clang format + naming improved
This commit is contained in:
@@ -15,34 +15,34 @@ class NetworkSocket
|
||||
{
|
||||
public:
|
||||
virtual int localport() = 0;
|
||||
|
||||
};
|
||||
|
||||
class DatagramSocket
|
||||
{
|
||||
friend class SocketHeap;
|
||||
friend class DatagramAgreggator;
|
||||
|
||||
public:
|
||||
DatagramSocket();
|
||||
virtual ~DatagramSocket();
|
||||
|
||||
virtual int localport();
|
||||
virtual int localport();
|
||||
|
||||
virtual void sendDatagram(InternetAddress& dest, const void* packetData, unsigned packetSize);
|
||||
virtual unsigned recvDatagram(InternetAddress& src, void* packetBuffer, unsigned packetCapacity);
|
||||
virtual void closeSocket();
|
||||
virtual bool isValid() const;
|
||||
virtual int family() const;
|
||||
virtual bool setBlocking(bool blocking);
|
||||
virtual SOCKET socket() const;
|
||||
virtual void sendDatagram(InternetAddress& dest, const void* packetData, unsigned packetSize);
|
||||
virtual unsigned recvDatagram(InternetAddress& src, void* packetBuffer, unsigned packetCapacity);
|
||||
virtual void closeSocket();
|
||||
virtual bool isValid() const;
|
||||
virtual int family() const;
|
||||
virtual bool setBlocking(bool blocking);
|
||||
virtual SOCKET socket() const;
|
||||
|
||||
virtual void open(int family);
|
||||
virtual void open(int family);
|
||||
|
||||
protected:
|
||||
int mFamily;
|
||||
int mFamily;
|
||||
SOCKET mHandle;
|
||||
int mLocalPort;
|
||||
void internalClose();
|
||||
int mLocalPort;
|
||||
void internalClose();
|
||||
};
|
||||
typedef std::shared_ptr<DatagramSocket> PDatagramSocket;
|
||||
|
||||
@@ -52,18 +52,18 @@ public:
|
||||
DatagramAgreggator();
|
||||
~DatagramAgreggator();
|
||||
|
||||
void addSocket(PDatagramSocket socket);
|
||||
unsigned count();
|
||||
bool hasDataAtIndex(unsigned index);
|
||||
void addSocket(PDatagramSocket socket);
|
||||
unsigned count();
|
||||
bool hasDataAtIndex(unsigned index);
|
||||
PDatagramSocket socketAt(unsigned index);
|
||||
|
||||
bool waitForData(std::chrono::milliseconds timeout);
|
||||
bool waitForData(std::chrono::milliseconds timeout);
|
||||
|
||||
protected:
|
||||
typedef std::vector<PDatagramSocket> SocketList;
|
||||
SocketList mSocketVector;
|
||||
fd_set mReadSet;
|
||||
SOCKET mMaxHandle;
|
||||
SocketList mSocketVector;
|
||||
fd_set mReadSet;
|
||||
SOCKET mMaxHandle;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user