[comp.sys.mac.programmer] The prefered AppleTalk interface, is it from hell or what?

jamesbo@microsoft.UUCP (James Borquist) (06/15/90)

Hi there!  I'm trying to use the perfered interface to transmit some
information between two computers via ATP.  I have been doing this
with the alternative interface for quite some time now with the best
of success, but for some reason, I just can't seem to get this to 
work with the prefered interface.  I have two programs. They are quite
simple tests, they don't do much, and they don't work.  Could someone
look at the following code fragments and tell me what I am doing 
wrong before I go completly crazy?

This is from the server:

	with requestPB { ATPParamBlock } do
	  begin
	    ioCompletion := nil;
	    atpSocket := mySocket; { byte }
	    reqLength := 578;
	    reqPointer := @requestBuffer; { array[1..578] of byte }
	  end;
	result := PGetRequest(@requestPB, true);
	while 1<>2 do
	  if requestPB.ioResult <= 0 then
	    begin
	      with responsePB { ATPParamBlock } do
	        begin
	          atpSocket := mySocket;
	          atpFlags := atpEOMvalue;
	          addrBlock := requestPB.addrBlock;
	          bdsPointer := @responseBDS; { BDSType }
	          filler0 := 1;
	          bdsSize := 1;
	          transID := requestPB.reqTID;
	        end;
	      result := PSendResponse(@responsePB, false);
	      with requestPB do
	        begin
	          ioCompletion := nil;
	          atpSocket := mySocket;
	          reqLength := 578;
	          reqPointer := @requestBuffer;
	        end;
	      result := PGetRequest(@requestPB, true);
	    end;

And this is from the Cient:

	with requestPB do
	  begin
	    atpFlags := atpXOvalue;
	    addrBlock := address; { from PLookupName and NBPExtract }
	    reqLength := 578;
	    reqPointer := @requestBuffer; { array[1..578] of byte }
	    bdsPointer := @responseBDS; { BDSType }
	    numOfBuffs := 1;
	    timeOutVal := 8;
	    retryCount := 3;
	  end;
	result := PSendRequest(@requestPB, false);

Please, somebody help me!!!

Thanks, 
James Borquist (uunet!uw-beaver!microsoft!jamesbo)