// MySocket.h: interface for the CMySocket class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MYSOCKET_H__2BD08342_32C8_11D7_A913_00902775C68D__INCLUDED_)
#define AFX_MYSOCKET_H__2BD08342_32C8_11D7_A913_00902775C68D__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#if _MSC_VER > 1200  // Version Higher than VC6
#ifndef _WIN32_WINNT
#define _WIN32_WINNT 0x0502 // phyu 19Jan2012
#endif
#endif

#include <afxsock.h>             // MFC socket extensions

class CVisionNW;
class CMySocket : public CSocket // CAsyncSocket
{
public:
    explicit CMySocket(CVisionNW *pParent);
    virtual ~CMySocket();

    virtual BOOL OnMessagePending();
    void         SetParent(CVisionNW *pVision);

protected:
    virtual void OnSend(int nErrorCode);
    virtual void OnReceive(int nErrorCode);
    virtual void OnClose(int nErrorCode);
    virtual void OnConnect(int nErrorCode);
    virtual void OnAccept(int nErrorCode);
private:
    CVisionNW* m_pcVision;
};

#endif // !defined(AFX_MYSOCKET_H__2BD08342_32C8_11D7_A913_00902775C68D__INCLUDED_)
