× 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.


  • Subject: A problem with TCP/IP...
  • From: Dan Rasch <drasch@xxxxxxxxxxxx>
  • Date: Wed, 15 Mar 2000 23:01:38 -0600 (CST)










Example # 1.


Dan Rasch - because if the human species concentrated on the really
important things in life, there would be a shortage of fishing poles! 


On the Server (AS400 production machine), we have an ILE RPG program,
using C prototypes, acting as the server module. On the Client (AS400
development machine), we have an ILE RPG program, using C prototypes,
acting as the client module.  They both are using TCP/IP Sockets for the
communications between the machines. 

 

We are sending and receiving a buffer of data that is 2048 in length.  The
problem that we are having seems to be on the Server (AS400 production
machine).  When we receive the buffer on the Server, it does / does not
get the entire buffer in one receive process.  We have added code to
perform an additional receive when it does not get the entire buffer in
the first receive.


The following is what is printed from the server module during the
execution of this process on the AS400 production machine.  The client
module is on the AS400 development machine.


Opened Tcp/Ip Port#: 0000010001                                         

Listening  on Port#: 0000010001                                         

Reading, client                                                         

Received Request: 1      ACTION =    LEN = 0000002048 Rtncd = 0000001404
first receive

Received Request:        ACTION =    LEN = 0000002048 Rtncd = 0000000644
second receive

Sent back: One   Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: 2      ACTION =    LEN = 0000002048 Rtncd = 0000001404
first receive

Received Request:        ACTION =    LEN = 0000002048 Rtncd = 0000000644
second receive

Sent back: Two   Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: 3      ACTION =    LEN = 0000002048 Rtncd = 0000001404
first receive

Received Request:        ACTION =    LEN = 0000002048 Rtncd = 0000000644
second receive

Sent back: Three Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: 1      ACTION =    LEN = 0000002048 Rtncd = 0000001404
first receive

Received Request:        ACTION =    LEN = 0000002048 Rtncd = 0000000644
second receive

Sent back: One   Rtncd = 0000002048                                     

Reading, client

Received Request: 2      ACTION =    LEN = 0000002048 Rtncd = 0000002048
received ok

Sent back: Two   Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: e      ACTION =    LEN = 0000002048 Rtncd = 0000001404
first receive

Received Request:        ACTION =    LEN = 0000002048 Rtncd = 0000000644
second receive

Sent back: Bad...Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: eoj    ACTION =    LEN = 0000002048 Rtncd = 0000001404
first receive

Received Request:        ACTION =    LEN = 0000002048 Rtncd = 0000000644
second receive

Sent back: ok    Rtncd = 0000002048                                     

Closing Client                                                          

Closing Server


As you can see it does / does not receive the entire buffer on one receive
process.

 Example # 2.


In this example we are running the Server module on the AS400 development
machine and the Client module on the AS400 production machine.


We are sending and receiving the same buffer of data that is 2048 in
lenth.  As you can see, the server module receives each send as one 2048
buffer.


The following is what is printed from the server module during the
execution of this process on the AS400 development machine.  The client
module is on the AS400 production machine.


Opened Tcp/Ip Port#: 0000011001                                         

Listening  on Port#: 0000011001                                         

Reading, client                                                         

Received Request: 1      ACTION =    LEN = 0000002048 Rtncd = 0000002048
received ok

Sent back: One   Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: 2      ACTION =    LEN = 0000002048 Rtncd = 0000002048
received ok

Sent back: Two   Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: 3      ACTION =    LEN = 0000002048 Rtncd = 0000002048
received ok

Sent back: Three Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: 1      ACTION =    LEN = 0000002048 Rtncd = 0000002048
received ok

Sent back: One   Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: 2      ACTION =    LEN = 0000002048 Rtncd = 0000002048
received ok

Sent back: Two   Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: 3      ACTION =    LEN = 0000002048 Rtncd = 0000002048
received ok

Sent back: Three Rtncd = 0000002048                                     

Reading, client                                                         

Received Request: eoj    ACTION =    LEN = 0000002048 Rtncd = 0000002048
received ok

Sent back: ok    Rtncd = 0000002048                                     

Closing Client                                                          

Closing Server


As you can see it does / does not receive the entire buffer on one receive
process.


We have executed both the server and client modules on each of the
machines and they perform correctly every time.  We have reviewed both the
ILE RPG and C modules to insure that all buffers are set to 2048.


The problem is that we should not have to do multiple receives to get the
entire buffer of information that is being sent.  At this point we are in
need of assistance in the resolution of this problem.




Sorry for the tag line appearing out of order.....

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.