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



Hi Charlie,

Does the fact that I get an integer rather than -1 mean that I DID get a connection?
It's hard to tell when I can't see a reply, and my attempts to get a reply have failed so far.

-1 means it failed. Anything higher than that means it succeeded.
(-2 and lower are undefined.)


1.) Regarding the connect:
Or do I need to do a connect() in RPG and then, once I'm connected to
the server through the RPG program, send their CONNECT data to their
CONNECT API. It seems odd that I have to connect() so that I can
CONNECT.

I am not familiar with your vendor's protocol, so I can't answer that question. Maybe experiment with a telnet client or similar and see what happens?

It's possible that two different APIs just happen to have the same name. (Just like people... Charles Wilt and Charles Versfelt are both 'Charles', but are different people.)

But I have no way of knowing if that's the case in this instance. I'm not familiar with the vendor's protocol. I can tell you all about the Berkeley connect() API, but I can't tell you anything about your vendors APIs or what they're called.


My question: Is that string something that I need to set up in the
data structure going into connect()?


No. The connect() data structure is only for establishing connections. When you want to send data, you use the send() API.


You did say in the "Introduction to TCP/IP Programming" that data
structure in the sample (connto), a likeds to sockaddr_in And you
said that "There are different socket address data structures for
different network protocols."

That's true, but the "network protocol" in this context is TCP/IP. Any application that runs over TCP/IP would either use sockaddr_in (IPv4) or sockaddr_in6 (IPv6).



Do I need to do the connect() and THEN do a SendAscii with the string
starting '0000000035CONNECT|...


I'm not sure what 'SendAscii' is, assuming that it converts data to ASCII and then sends it, it sounds like the right choice.



Since I AM getting an integer with the connect(), may be I was
correct with my connect logic and I have a problem with the send().
Again, I'm not sure how to re-code it


What problem are you having with the send()?



I'm trying to write the procedure so that, after I do the SendAscii
that would receive data back and convert it back to EBCDIC from
ASCII, sort of the opposite of SendAscii... RecvAscii.


That sounds good.



It's getting a -1 on RecLen = recv(s: RspBufAdr : RspBufLen : 0);


Next step is to retrieve errno and see what the error is...


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.