× 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: Re: socket programming question
  • From: Jim Langston <jimlangston@xxxxxxxxxxxxxxxx>
  • Date: Mon, 09 Jul 2001 09:30:30 -0700
  • Organization: Pacer International

Yes, with no problem, Steve.  This is a confusion about sockets that
took me a while to understand.

When the server side program listens to a port, it actually uses that
port on the machine.  When the client side program connect to a port
on the server, it does not necessarily use that port on it's own machine,
but some random port number.

Something like this:
Server: Listen on port 1234.
Client: Opens up port 10000 to connect to remote machine on port 1234.
Server: Dependent on program, either stays on port 1234 or changes the
 port to some other random number so a new thread can deal with it.

The only real thing you have to remember is, if you are listening on a
port you are actually using that port on the local machine.  If you are 
connecting to a port, you are using whatever port (usually random) on 
the local machine.

HTH,

Jim Langston

Date: Thu, 5 Jul 2001 21:59:59 -0400
From: "Steve Richter" <srichter@AutoCoder.com>
Subject: socket programming question

day 1 as an rpg socket pgmr ...

Can I test my pair of pgms on the same as400? One pgm listens and reads from
a port, the other pgm, on the same as400, writes to that same port.

Similar to the Intra communication device used when testing an appc pgm.

Thanks,

Steve Richter
( my real name )
+---
| 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.