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



Thanks Jim, Leif, Chris and Scott

The telnet tip is a good one. When I telnet to my socket listener on the 400
a conversation is started. So I know my as400 listen pgm is on the right
track.

I saw the "htons( )" in the code Leif sent. I was going to investigate what
it did, but now Scott you have saved the day!


Thanks all,

Steve



>
>The problem is on the PC end.   Intel architecture's use a 'byte-swapped'
>format for storing integers and other variables.   In other words, they
>store the bytes for an integer with the LSB first, and the MSB last.
>
>However, the TCP/IP standard (as well as the AS/400 itself) do not use
>this byte swapped format.
>
>So, when your PC program does a 'sin_port = 3005' it won't work.   (your
>PC's representation of 3005 is different from the network's)

-----Original Message-----
From: Jim Langston <jimlangston@conexfreight.com>
To: MIDRANGE-L@midrange.com <MIDRANGE-L@midrange.com>
Date: Tuesday, July 24, 2001 1:31 AM
Subject: Re: socket pc


>Steve,
>
>First thing you want to do is to find out if it's the PC or the AS/400
that's causing
>the problem.  From the PC you are trying to connect to the AS/400 from:
>
>[Start][Run]telnet 172.xx.y.z 3005
>press enter.  (you enter the telnet line in the run box).
>Telnet window should come up.  If it connects you should see the server
sitting
>in the top/left hand corner.  If your AS/400 sends any data on connection
you
>should see that.
>If it is not connecting you will get a windows error dialog saying it
couldn't connect
>and why.
>So now you should know which end is broken, the AS/400 or the PC.
>
>Telnet can be used to connect to any port, not just telnet ports, and is
great for testing.
>If you are adventurous and read really fast you can actually see web pages
with it,
>though the syntax for the commands is a pain.
>
>Incidently, it is perfect safe to give an 172.x.x.x number, that range is
local to your
>network and can't be reached from the internet.
>
>HTH,
>
>Regards,
>
>Jim Langston
>
>Date: Mon, 23 Jul 2001 20:01:44 -0400
>From: "srichter " <srichter@mail.autocoder.com>
>Subject: [none]
>
>Hello all,
>
>I am attempting to socket from a win95 pc to an as400. Both systems are on
the same local ethernet lan. Both behind the
>firewall.
>When I run connect( ) on the pc, a "WSAECONNREFUSED" ( the attempt to
connect was forcefully rejected ) error code is
>returned.
>
>My "Listen" pgm is running on the as400.  It was able to rcv data on a
loopback test, so I am reasonably sure it is coded
>correctly.
>
>Do I have to enable anything on the 400 or pc before socketing from one
system to the other?  Any ideas?  Why the
>WSAECONNREFUSED error?
>
>Does the 400 log socket connection attempts that are refused?
>
>Thanks,
>Steve Richter
>
>Here is the code.  First the c code on the pc, then the rpg ile as400 code.
>
><Code snipped>
>
>+---
>| 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
>+---
>

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