BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Is it possible to share a port with two different protocol s

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock
View previous topic :: View next topic  
Author Message
keyser
Guest





PostPosted: Fri Sep 16, 2005 5:25 pm    Post subject: Is it possible to share a port with two different protocol s Reply with quote




Is it possible for a TidHTTPServer and a TidTCPServer to share
the same port?

I have two apps with one of the above servers each. The customer
has configured every one of his products to allow a single port
through the firewall. But now he would like to have the
functionality of both applications at the same time and wants to
see if we can monitor a single port for both servers.

Is this even possible?

Thanks.
Back to top
Jack Mays
Guest





PostPosted: Fri Sep 16, 2005 5:46 pm    Post subject: Re: Is it possible to share a port with two different protoc Reply with quote



No, you cannot. the OS will not let you bind to a listening port that is
already in use.

--
Jack


"keyser" <keyser_soze (AT) usa (DOT) com> wrote

Quote:

Is it possible for a TidHTTPServer and a TidTCPServer to share
the same port?

I have two apps with one of the above servers each. The customer
has configured every one of his products to allow a single port
through the firewall. But now he would like to have the
functionality of both applications at the same time and wants to
see if we can monitor a single port for both servers.

Is this even possible?

Thanks.



Back to top
keyser
Guest





PostPosted: Fri Sep 16, 2005 6:22 pm    Post subject: Re: Is it possible to share a port with two different protoc Reply with quote




"Jack Mays" <no.spam (AT) no (DOT) spam> wrote:
Quote:
No, you cannot. the OS will not let you bind to a listening port that is
already in use.

--
Jack

I was hoping that I could bind with the TidTCPServer and upon

recognizing an inbound HTTP connection, pass it over to the
TidHTTPServer, since both servers spawn a new threads for each
connection.

Thanks.

Back to top
Martin James
Guest





PostPosted: Fri Sep 16, 2005 10:32 pm    Post subject: Re: Is it possible to share a port with two different protoc Reply with quote

Quote:
I was hoping that I could bind with the TidTCPServer and upon
recognizing an inbound HTTP connection, pass it over to the
TidHTTPServer, since both servers spawn a new threads for each
connection.

HTTP is a TCP protocol, so any incoming data is certainly TCP, but may, or
may not, be HTPP. Hence a problem - recognizing an inbound HTTP connection.

Rgds,
Martin



Back to top
Martin James
Guest





PostPosted: Fri Sep 16, 2005 10:41 pm    Post subject: Re: Is it possible to share a port with two different protoc Reply with quote

Quote:
HTTP is a TCP protocol, so any incoming data is certainly TCP, but may, or
may not, be HTPP. Hence a problem - recognizing an inbound HTTP
connection.


...HTPP? or even HTTP, (squeezes wine bag... hic...<g>)

Rgds,
Martin 'pissed' James



Back to top
Martin James
Guest





PostPosted: Fri Sep 16, 2005 10:58 pm    Post subject: Re: Is it possible to share a port with two different protoc Reply with quote

Persuade your client netAdmin to open another port, like the Palestinians in
Gaza. 81 seems a reasonalbe bet. AFAIK, there are no Billy wormholes on
81, (unless your app wants to take on this job:)

Rgds,
Martin


Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Sep 19, 2005 7:48 am    Post subject: Re: Is it possible to share a port with two different protoc Reply with quote


"keyser" <keyser_soze (AT) usa (DOT) com> wrote


Quote:
Is it possible for a TidHTTPServer and a
TidTCPServer to share the same port?

Yes, but only if they are each bound to a different IP address from each
other. As long as they are listening on different IPs, then they can both
listen on the same port number.

Quote:
I have two apps with one of the above servers each. The
customer has configured every one of his products to allow a
single port through the firewall. But now he would like to have
the functionality of both applications at the same time and wants
to see if we can monitor a single port for both servers.

If binding to different IP addresses is not an option, then one of the
server must listen on a different port number.


Gambit



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Sep 19, 2005 7:49 am    Post subject: Re: Is it possible to share a port with two different protoc Reply with quote


"Jack Mays" <no.spam (AT) no (DOT) spam> wrote


Quote:
No, you cannot.

Yes, you can. See my other reply.


Gambit



Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Mon Sep 19, 2005 7:50 am    Post subject: Re: Is it possible to share a port with two different protoc Reply with quote


"keyser" <keyser_soze (AT) usa (DOT) com> wrote


Quote:
I was hoping that I could bind with the TidTCPServer and upon
recognizing an inbound HTTP connection, pass it over to the
TidHTTPServer, since both servers spawn a new threads for each
connection.

Why do you need a TIdTCPServer for that? HTTP is a TCP-based protocol, so
your HTTP clients would connect to it directly. There is no need for a
separate TIdTCPServer to handle that.


Gambit



Back to top
Chad Z. Hower aka Kudzu
Guest





PostPosted: Tue Sep 20, 2005 5:59 pm    Post subject: Re: Is it possible to share a port with two different protoc Reply with quote

"Jack Mays" <no.spam (AT) no (DOT) spam> wrote in
news:432b054b$1 (AT) newsgroups (DOT) borland.com:
Quote:
No, you cannot. the OS will not let you bind to a listening port that
is already in use.

Almost - you can force reuse of a port and share it between two servers. In such a case, its
"random" as to which server gets each incoming requests.


--
Chad Z. Hower (a.k.a. Kudzu) - http://www.KudzuWorld.com/
"Programming is an art form that fights back"

Want to keep up to date with Indy?

Join Indy News - it free!

http://www.atozed.com/indy/news/

Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Internet Winsock All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.