/*
 * zzTcpClient.h
 * 
 * The Zen API 
 * Copyright (C) 2008-2009 by LMI Technologies Inc.
 * 
 * Licensed under The MIT License.
 * Redistributions of files must retain the above copyright notice.
 */
#ifndef LMITECH_ZZTCPCLIENT_H_INCLUDED
#define LMITECH_ZZTCPCLIENT_H_INCLUDED

#include <zTcpClient.h>
#include <zApiBegin.h>

typedef struct zTcpClientClass
{   
    zSocket socket;
    zByte* readBuffer;
    zUIntPtr readCapacity;
    zUIntPtr readBegin;
    zUIntPtr readEnd;
    zByte* writeBuffer;
    zUIntPtr writeCapacity;
    zUIntPtr writeEnd;
} zTcpClientClass;

ZAPI_EXPORT(zStatus) zTcpClient_ConstructAttach(zTcpClient* client, zSocket* socket);
ZAPI_EXPORT(zStatus) zTcpClient_ReadAtLeast(zTcpClient client, zByte* buffer, zUIntPtr minCount, zUIntPtr maxCount, zUIntPtr* bytesRead); 

#include <zApiEnd.h>

#endif           /* #ifndef LMITECH_ZZTCPCLIENT_H_INCLUDED */
