{===========================================================================================}
{	LlamaTalkCPRead}
{	}
{	Copyright © 1994 Apple Computer, Inc.}
{	All rights reserved}
{	}
{	Modification Status}
{	YY/MM/DD	Name				Comments}
{	94/09/12	Jim Schram		Added CodeWarrior support, released as 1.0a4}
{	94/05/04	Jim Schram		Released as 1.0a1}
{	94/03/24	Jim Schram		Initial Development}
{	}
{-------------------------------------------------------------------------------------------------------------}
Unit LlamaTalkCPRead;

Interface

	Uses
		LlamaTalk;

{$MAIN}
	Procedure Main (connHdl: ConnHandle);

Implementation

	Procedure Main (connHdl: ConnHandle);
		Var
			globals: LTGlobalsHdl;
			socket: Short;
	Begin
		globals := LTGlobalsHdl(connHdl^^.refCon);
		socket := connHdl^^.userData;
		With globals^^.fSockets[socket] Do Begin
				fReadCount := fConnHdl^^.asyncCount[cmDataIn];
				Case fConnHdl^^.errCode Of
					cmNoErr: 
						Case fReadPhase Of
							cLTReadPhase2: 
								fReadPhase := cLTReadPhase3;
							cLTReadPhase4: 
								fReadPhase := cLTReadPhase5;
						End;
					Otherwise
						fReadPhase := cLTReadPhaseError;
				End;
			End;
	End;

End.