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



Title: RE: How is a socket id assigned?

Socket ID or descriptors are nothing more than an integer that is used as an index to a port at an IP address for the job.  I have seen, in my server programs, the socket id starts out as zero, which is the one I am generally listening at.  The first connection I accept is socket descriptor one, then two, then three.  Now the outbound ports tend to be the next one available unless you specify a port to listen at.  Servers need to listen at a peculiar port so clients now how to find them.

HTH

Christopher K. Bipes    mailto:ChrisB@Cross-Check.com
Sr. Programmer/Analyst  mailto:Chris_Bipes@Yahoo.com
CrossCheck, Inc.        http://www.cross-check.com
6119 State Farm Drive   Phone: 707 586-0551 x 1102
Rohnert Park CA  94928  Fax: 707 586-1884

If consistency is the hobgoblin of little minds, only geniuses work here.  Karen Herbelin - Readers Digest 3/2000

-----Original Message-----
From: Patrick Conner [mailto:pwconner@charter.net]
Sent: Wednesday, January 24, 2001 7:38 AM
To: RPG400-L@midrange.com
Subject: How is a socket id assignned?


I'm working with SServer3 and SClient3 from "Who Knew...
RPGIV?"

I'm seeing that both SServer3 and SClient3 are creating
socket 3. In SServer3 the socket 3 is listening for clients.
In SClient3 socket 3 is communicating to socket 4 in
SServer3 once accepted.

I did some playing around because I thought socket 3 and
socket 4 meant something to one another, but found out
differently.

Once socket 3 was created in SClient3 I wrote to it and
closed it. I then repeated this three or four times while
SServer3 was in debug and sitting on an instruction. I
started stepping through SServer3 at this point and found
that socket 3 alternated communicationg to socket 4 and
socket 5 in SServer3.

I guess socket ids don't mean much. They just go get ports.

Right?

Patrick Conner
www.ConnecTown.com
828-244-0822


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.