W5200(WIZ820io) network interface

MyNetUdpSocket.h

Committer:
va009039
Date:
2012-04-19
Revision:
2:a8df39b4f3aa
Parent:
1:803123933c5a

File content as of revision 2:a8df39b4f3aa:

// MyNetUdpSocket.h 2012/4/16
#ifndef MYNETUDPSOCKET_H
#define MYNETUDPSOCKET_H
#include "if/net/netudpsocket.h"

class MyNetUdpSocket: public NetUdpSocket {
public:
    MyNetUdpSocket(int socket = (-1));
    virtual ~MyNetUdpSocket();
    virtual NetUdpSocketErr bind(const Host& me);
    virtual int /*if < 0 : NetUdpSocketErr*/ sendto(const char* buf, int len, Host* pHost);
    virtual int /*if < 0 : NetUdpSocketErr*/ recvfrom(char* buf, int len, Host* pHost);
    virtual NetUdpSocketErr close();
    virtual NetUdpSocketErr poll();
protected:
    int _socket;
private:
    void cleanUp(); //Flush input buffer
};
#endif //MYNETUDPSOCKET_H