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



Venogal,

I think you need to use the Select() function prior to your read().  As I
recall, Select() waits for a user defined period of time, until data is
received into the buffer, or the time expires. If the Select() returns
negative or zero, then you timed out.

hope this helps...

Eric DeLong
Sally Beauty Company
MIS-Project Manager (BSG)
940-898-7863 or ext. 1863



-----Original Message-----
From: Vengoal Chang [mailto:vengoal@xxxxxxxxxxx]
Sent: Friday, July 18, 2003 2:38 AM
To: 'RPG programming on the AS400 / iSeries'
Subject: How to set socket receive time out in RPGIV ?


Sorry, the RPG IV Socket Tutorial have receive time out value on Server
sample program. How do I use the same concept on the socket client
program ? Could I use following in client socket program ?

eval      tolen = %size(timeval) 
alloc     tolen         to      
eval      p_timeval = to         

callp     FD_ZERO(readset)     
callp     FD_SET(socket : readset)

eval      tv_sec = 60 
eval      tv_usec = 0 

eval      rc = select(socket+1: %addr(readset) :  *NULL : *NULL : to)  

eval      len = recv(sock: %addr(buf):%size(buf), 0)   

Any help appreciated.

Best regards,

Vengoal Chang


-----Original Message-----
From: Vengoal Chang [mailto:vengoal@xxxxxxxxxxx] 
Sent: Friday, July 18, 2003 3:03 PM
To: 'RPG programming on the AS400 / iSeries'
Subject: How to set socket receive time out in RPGIV ?


Dear folks,
        I use the RPG IV Socket Tutorial by Scott Klement for  writing
socket AP. But I don't know how to set receive time out time. I check
information center, the rcvtimeout support from V5R2 setsockopt98 API.
Does someone help me or post some RPG example ? Any help appreciated.

Best regards,

Vengoal Chang


_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.