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



>     First off...no, I meant port 9700.   The way this is to  work is that I
> will be the server and will listen for messages coming through an
> Egate(gateway) on port 9700.   When a message comes in, I receive the data
> and send it off to another RPG program to be worked with.  I then send an
> ACK message back out on port 9700 to the egate.

Okay.

>     When I use the Accept API, there's a remote port (descriptor?) which is
> not 9700 opened for receiving my data.

When you create a TCP connection, it connects a remote host with a remote
port number to your server port on your local host.  Then, any data sent
in one side will come out the other side and vice-versa.

When you close that connection, you disable this ability to send data back
and forth until a new connection has been established.


> Should I be closing that remote port after my ACK message is sent back?
> Or should they be shutting it down?

I can't answer this.   Whomever designed the application needs to specify
when the connection is dropped, and who drops it.  There's no "right" or
"wrong" way, you just have to do whatever works the best for your
application, and make sure everyone involved agrees to do it that way.

Like I said in my last message -- I don't know how your application is
supposed to work, so I can't tell you how you should do it.

Personally, I like to think of TCP connections as being like telephone
calls...  It's an analogy that I use frequently...   so let's translate
your question into telephone terms:

   1) My extension is 9700.
   2) When someone calls me, I pick up the receiver ("accept")
   3) The person asks me a question.
   4) I answer the question.
   5) The person says "I understand, thank you!"  ("ACK")
   6) Now, do I hang up the phone?   Or do I give him/her a chance to
         ask another question?

So, the answer is, what is that person expecting?   If she is expecting me
to hang up after the "thank you", then that's what I should do.   If she
is expecting me to wait for her to say "bye", then I should wait.

It's not a matter of right or wrong, it's a matter of what me & my caller
have agreed to do.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.