//
//  Copyright © 2004, RESON Inc. All Rights Reserved.
//
//  No part of this file may be reproduced or transmitted in any form or by
//  any means, electronic or mechanical, including photocopy, recording, or
//  information storage or retrieval system, without permission in writing
//  from RESON Inc.
//
//  Filename:   
//
//  Project:    6046
//
//  Author(s):  W. Arcus
//
//  Purpose:    
//
//  Notes:      
//

#if !defined(AFX_TCPSOCKET_H__3383C1A1_88F9_43DE_B746_93905A2555BB__INCLUDED_)
#define AFX_TCPSOCKET_H__3383C1A1_88F9_43DE_B746_93905A2555BB__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "ClientConnections.h"

class CTCPSocket
{
public:

    ///////////////
    // Services.

                            CTCPSocket      (   const unsigned short    &runPort,
                                                const unsigned long     &rulSendAddress,
                                                PFN_DATACALLBACK        pfnCallback,
                                                void *                  pvCallbackParam );
                           
    virtual                ~CTCPSocket      (   void );
                           
    bool                    IsInitialized   (   void ) const;
                           
    bool                    Send            (   BYTE                   *pbyStream,
                                                const unsigned long    &rulNumBytes,
                                                const int              &riSocketIndex );

private:

    ///////////////
    // Attributes.

    const unsigned long     m_ulMaxMessageLength;

    bool                    m_bInitialized;

    CClientConnections     *m_pClients;

    ///////////////
    // Services.

                            CTCPSocket      (   void );                                                 // Not implemented thus private.
                            CTCPSocket      (   const CTCPSocket       &rRhs );                         // Not implemented thus private.
    CTCPSocket &            operator    =   (   const CTCPSocket       &rRhs );                         // Not implemented thus private.

};

#endif // !defined(AFX_TCPSOCKET_H__3383C1A1_88F9_43DE_B746_93905A2555BB__INCLUDED_)
