× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yes when I was talking of sending an ACK I mean a custom ACK (message
"Record received" or "End of Data" etc.



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of James Rich
Sent: Thursday, September 11, 2003 12:49 PM
To: Midrange Systems Technical Discussion
Subject: Re: Socket program problem

John Allen wrote:

> The iSeries is acting as the Server and it sits and waits for the PC
Clients
> to connect.
> The PC sends a request for a file to the iSeries and then waits for a
> response back (Event message).
> The iSeries builds the file and sends it back to the PC one record at a
time
> (in XML format) The building of the file and sending all of the records in
> XML format takes about 2 seconds.
> While the iSeries is sending the records, the PC client starts receiving
the
> records in groups (number of records it receives with each receive varies
> from 1-5 records at a time) Before the PC receives all the records it
> receives a 10053  WSAECONNABORTED and transmission is terminated.
> 
> I read somewhere that after sending data I should wait for an ack before
> proceeding. Does this mean when the iSeries send a single record it should
> wait til the PC receives it and the PC send an ack back to the iSeries,
then
> the iSeries should send another record etc. etc. ?

Unless I'm really misunderstanding something here, I think you are 
confused.  The TCP protocol itself sends the ACK.  Your application is a 
higher layer so it doesn't.  TCP takes care of SYN, ACK, etc. without 
you having to do anything.

> In this application when the iSeries receives a request (ie PC wants file
x)
> The iSeries spawns off a separate job that builds the file and send the
data
> to the PC. 
> The iSeries never acknowledges to the PC that it got the request. It just
> builds the file and starts sending records to the PC. When the iSeries
> program (spawned program) is done sending the records it ends. 
> The PC (client) starts receiving the records and when done receiving the
> records it displays them. 

Sounds very reasonable.

> At all 10 remote locations, if the file requested is small (about 10
> records) all 10 locations work fine, they receive all data just fine.
> 
> But when the file requested is larger (about 20 or so records)
> Two of our 10 remote locations never receive all the data They both
> consistently get the 10053  WSAECONNABORTED before all records are
received.
> 
> We were going to re-write the application tonight and write it so that
> whenever the PC or the iSeries sends data (even after each individual(
they
> are going to wait until the other side ack that they received the data and
> is waiting for the next
> 
> Is this a waste of my time? The programmers here are just guessing at what
> it could be, but we are out of ideas except for this rewrite.
> 
> New program would
> 1) iSeries waiting for request
> 2) PC send req to iSeries for file X, then waits for ack from iSeries
> 3) iSeries receives request for file x, sends ack to the PC that the
request
> was received and spawns Job A to build the file and transmit to PC
> 4) PC get ack from iseries and waits for data
> 5) iSeries Job A build file and sends record 1 (with X'FF' at end of
record)
> then waits for ack from PC that the record was received
> PC receives record 1 and knows it is complete because of x'FF' and send
ack
> to the iSeries
> 6) iSeries receives ack from PC and the two go back and forth til all
> records are sent and received.
> 
> Is there any chance this might fix my problem?

While you certainly can communicate between the hosts when data is 
received (and that is probably a good idea), TCP does ACK, not your 
application.  You can send your own custom acknowlege if you want in 
addition, but TCP is still going to ACK.

Try something like this:

1.  Start the server program on the iSeries.
2.  Use telnet to connect to the server program.  For example:
       telnet myas400 4543    (this assumes that your server program 
runs on port 4543)
3.  In telnet, send to the iSeries the command the PC would normally 
send to initiate the file transfer.
4.  Watch what happens.

If in step 4 things don't work like you expect, let us know what happened.

James Rich

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.