Multiple Local IP Ports

Hi,

Am looking for the simpliest way to open local ports (10,20,50) using ttcp 
via an database table, same time.

Lieven.
0
Lieven
7/22/2015 9:21:34 AM
embarcadero.delphi.winsock 1874 articles. 2 followers. Follow

7 Replies
417 Views

Similar Articles

[PageSpeed] 46

Lieven wrote:

> Am looking for the simpliest way to open local ports (10,20,50)
> using ttcp via an database table, same time.

Your question is a bit too vague.  What exactly are you trying to accomplish?

-- 
Remy Lebeau (TeamB)
0
Remy
7/22/2015 7:14:02 PM
Hi Remy,

For instance I want to open port 5050,5051,5052,5053.5054 localhost same 
time.
Now this open ports should communicate read from write to port 6000 .
How could this be done merely using ttcp?

Lieven

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:728621@forums.embarcadero.com...
> Lieven wrote:
>
>> Am looking for the simpliest way to open local ports (10,20,50)
>> using ttcp via an database table, same time.
>
> Your question is a bit too vague.  What exactly are you trying to 
> accomplish?
>
> -- 
> Remy Lebeau (TeamB)
0
Lieven
7/22/2015 8:05:01 PM
Lieven wrote:

> For instance I want to open port 5050,5051,5052,5053.5054 localhost
> same time.

You need a separate TCP socket for each port.  What does "ttcp" refer to 
exactly?  TTcpServer?  TTcpClient?  Some other TCP component?  In any case, 
you will likely need multiple instances of that component, one for each port. 
 If you are trying to open multiple ports for listening, you could use Indy's 
TIdTCPServer component, which has a Bindings collection for opening multiple 
listening ports at one time (using a separate socket for each one).

> Now this open ports should communicate read from write to port 6000 .

Now you are confusing the issue again.  What does port 6000 have to do with 
anything?  Are you trying to open multiple listening ports on 50xx and have 
them receive inbound connections from port 6000?  Or are you trying to create 
multiple outbound connections that originate from 50xx port and all connect 
to port 6000?

What EXACTLY are you trying to accomplish?

-- 
Remy Lebeau (TeamB)
0
Remy
7/22/2015 9:17:01 PM
Hi Remy ,

>Now you are confusing the issue again.  What does port 6000 have to do with
>anything?  Are you trying to open multiple listening ports on 50xx and have
>them receive inbound connections from port 6000?  Or are you trying to 
>create
>multiple outbound connections that originate from 50xx port and all connect
>to port 6000?


//Are you trying to open multiple listening ports on 50xx and have
//them receive inbound connections from port 6000?

This is the one Remy.
Sorry if I do confuse you with my question.

Lieven


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:728637@forums.embarcadero.com...
> Lieven wrote:
>
>> For instance I want to open port 5050,5051,5052,5053.5054 localhost
>> same time.
>
> What EXACTLY are you trying to accomplish?
0
Lieven
7/24/2015 10:30:23 AM
Hi Remy ,

>Now you are confusing the issue again.  What does port 6000 have to do with
>anything?  Are you trying to open multiple listening ports on 50xx and have
>them receive inbound connections from port 6000?  Or are you trying to 
>create
>multiple outbound connections that originate from 50xx port and all connect
>to port 6000?


//Are you trying to open multiple listening ports on 50xx and have
//them receive inbound connections from port 6000?

This is the one Remy.
Sorry if I do confuse you with my question.

Lieven


"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:728637@forums.embarcadero.com...
> Lieven wrote:
>
>> For instance I want to open port 5050,5051,5052,5053.5054 localhost
>> same time.
>
> What EXACTLY are you trying to accomplish?
0
Lieven
7/24/2015 10:32:58 AM
Lieven wrote:

> //Are you trying to open multiple listening ports on 50xx and have
> //them receive inbound connections from port 6000?
> 
> This is the one Remy.

Then look at Iny's TIdTCPServer component and its Bindings collection.  For 
example:

{code}
IdTCPServer1.Active := False;
IdTCPServer1.Bindings.Clear;
Query.First;
if not Query.Eof then
begin
  repeat
    IdTCPServer1.Bindings.Add.Port := Query.FieldByName('Port').AsInteger;
    Query.Next;
  until Query.Eof;
  IdTCPServer1.Active := true;
end;
{code}

Just know that if any port fails to open, the server will shut down all of 
them.  If you want to listen on some ports even if others fail to open, you 
could do something like this instead:

{code}
IdTCPServer1.Active := False;
IdTCPServer1.Bindings.Clear;
Query.First;
while not Query.Eof do
begin
  IdTCPServer1.Bindings.Add.Port := Query.FieldByName('Port').AsInteger;
  try
    if IdTCPServer1.Active then
      IdTCPServer1.StartListening
    else
      IdTCPServer1.Active := true;
  except
    IdTCPServer1.Bindings.Delete(IdTCPServer1.Bindings.Count-1);
  end;
  Query.Next;
end;
{code}

-- 
Remy Lebeau (TeamB)
0
Remy
7/24/2015 5:10:32 PM
Thank you Remy.

"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:728800@forums.embarcadero.com...
> Lieven wrote:
>
>> //Are you trying to open multiple listening ports on 50xx and have
>> //them receive inbound connections from port 6000?
>>
>> This is the one Remy.
>
> Then look at Iny's TIdTCPServer component and its Bindings collection. 
> For
> example:
>
> {code}
> IdTCPServer1.Active := False;
> IdTCPServer1.Bindings.Clear;
> Query.First;
> if not Query.Eof then
> begin
>  repeat
>    IdTCPServer1.Bindings.Add.Port := Query.FieldByName('Port').AsInteger;
>    Query.Next;
>  until Query.Eof;
>  IdTCPServer1.Active := true;
> end;
> {code}
>
> Just know that if any port fails to open, the server will shut down all of
> them.  If you want to listen on some ports even if others fail to open, 
> you
> could do something like this instead:
>
> {code}
> IdTCPServer1.Active := False;
> IdTCPServer1.Bindings.Clear;
> Query.First;
> while not Query.Eof do
> begin
>  IdTCPServer1.Bindings.Add.Port := Query.FieldByName('Port').AsInteger;
>  try
>    if IdTCPServer1.Active then
>      IdTCPServer1.StartListening
>    else
>      IdTCPServer1.Active := true;
>  except
>    IdTCPServer1.Bindings.Delete(IdTCPServer1.Bindings.Count-1);
>  end;
>  Query.Next;
> end;
> {code}
>
> -- 
> Remy Lebeau (TeamB)
0
Lieven
7/25/2015 7:57:02 AM
Reply:

Similar Artilces:

Multiple Local IP Ports #2
Hi, Am looking for the simpliest way to open local ports (10,20,50) using ttcp via an database table, same time. Lieven. ...

Multiple local websites with same ip and port
Hello, I have Windows Server 2003 box and I am trying to create multiple local websites e.g. /project1">http://<machine_name>/project1, /project2">http://<machine_name>/project2 etc... By default, <machine_name>/ is pointing to a folder in my D drive e.g. D:\Projects. All my projects are under D:\Projects folder like D:\Projects\Project1, D:\Projects\Project2. Whenever I create a folder in D:\Projects, it should be automatically accessible by going to http://<machine_name>/<project_folder>  Is it possible to do this? I don't wan...

How can I have Multiple Portals & 1 Local IP & Different Port Numbers
Hi everyone, here is my situation. I installed DNN 4.0 and created a portal with an IP address of 172.16.11.107:8100and it works perfect. No problems. Then I created another portal and wanted to give the ip address of 172.16.11.107:8200. I created a web site under IIS and gave the same address of 172.16.11.107:8200 But the problem is, when I go to 172.16.11.107:8200, I am immediately forwarded to the first portal and the browser shows 172.16.11.107:8100 as the IP address. How can I have multiple Portals with one ip address, I don't have DNS Server on my system, all I have is one ip addr...

Source IP: Multiple IPs one Port
Ok. So I'm in the process of upgrading all the Cisco firewalls to IPFire. So far I've been getting compliments on how much faster the internet is. I didn't want to brag to them about how I invented it. It's our little secret. An interesting problem popped up in this: One client is using a spam filter service that forwards their email through 1 of 15 servers on a few different networks. I'm supposed to restrict permission on inbound port 25 to these 15 addresses or to those few networks. I could do it in GWIA but how does one do something like this in ...

port redirection, multiple IP addresses (or run on port 80)
Hi all. I have a problem (I am newbee in SuSE firewall0. I do have a openSuse 11.4 and multiple IP addresses on eth0 interface eth0, 10.5.6.11,10.5.6.12/10.5.6.13/10.5.6.14........ I run (trying to/have to) multiple TOMCAT servers. I am trying to have each tomcat instance listen to on separate IP address for example: tomcat 1 - 10.5.6.11 - HTTP=8080 HTTPS=8443 tomcat 2 - 10.5.6.12 - HTTP=8080 HTTPS=8443 What i am trying to do is to redirect a) tomcat 1 - 10.5.6.11:80 to 10.5.6.11:8080 10.5.6.11:443 to 10.5.6.11:8443 a) tomcat 2 - 10.5.6.12:80 to 10.5.6.12:8080 ...

Local IP Addresses, multiple NICs
Hello, I'm trying to get the IP addresses of a local PC and I'm having trouble if the PC has more than one NIC card. I've tried using MSWINSCK.OCX and the LocalIP property and I've tried using pbsw32.dll and the GetHost function but both only seem to report back the first IP address found. Besides redirecting the output of an IPCONFIG /all to a file and reading it, does anyone know how to find out the IP addresses of a PC with more than one NIC? Thanks. Most routines that grab the IP address do so by calling gethostbyname and then examining the hostent str...

Multiple IP:PORT connection and SMTPS
I took Devin's proposed patch to qpsmtpd-forkserver and implemented multiple IP:PORT listening. Then I modified plugins/tls to support switching to SSL during the connect phase (but only for port 465/SMTPS). I haven't updated the POD for plugins/tls yet (I'm hoping others can test it too). I committed the changes to branches/0.3x... John ...

multiple websites with multiple ip
Hi, I'm trying to config multiple websites with multiple ip (each website with one ip) with IIS6, which I guess should be easy if there's possible to config multiple websites with one ip, altough like this I can have one ftp server for each site using the standard port. anyway, when I try to start a website with another ip then the first one already runnig, it says it can't because it's using the same port as the first one. Can anyone tell me if it's possible to share the same port (80) with multiple websites and ips, and how to configure? thank you in advance Jordi ...

Get Local IP Address with Delphi 2009
Hi all How can I get the local IP Address with Delphi 2009? All examples i find are only running with Delphi 2007 because they are not using AnsiChar. Thank you for your help Herbert > > All examples i find are only running with Delphi 2007 because they are not > using AnsiChar. Replace Char with AnsiChar in the examples ? I got this off the Internet and I have used it in several projects. I changed char to ansichar for Delphi 2009 and it works. This function uses the winsock unit. function TForm1.GETIPAddress(): string; type pu_long = ^u_long; var varTWS...

Multiple GWIAs with Multiple IPs
I've read on these forums that GW7 should support the use of 2 GWIAs for outbound use. Is this actually the case? If so, how would I go about setting that up. I didn't see an option in the PO addressing to select a default gwia for outbound sends. That option is only available on the Domain for me. What I would like is to have 1 domain, 2 post offices, 2 GWIAs. One GWIA should service PO1 and the other GWIA should service PO2 for all outbound mail. I would like all of the header information to be accurate for the sending domain. For example, if PO1 is abc.com an...

Mapping multiple web apps to a single IP/port configuration
Hi Everyone, How do I map multiple web apps to a single IP/port configuration just like ISS uses Host headers? Thanks. I wondered the same thing myself a while back. I am assuming you want to have something like http://www.host1.com/default.jsp and http://www.host2.com/default.jsp point to the same EAServer and have EAServer figure out from the header how to respond (which web app etc). The quick answer is you can't do it. -- BOB FRANCIS <Super DBA> wrote in message news:42261764.5d47.1681692777@sybase.com... > Hi Everyone, > How do I map multiple web apps ...

Code Porting
Hi people, Basically, I am moving an app from Delphi 5 to Delphi 2009 which is all great (yeah right!) and I am having a couple of issues with some thirdparty components that we have the source code for. Being that I wanted to make the task as easy as possible, I was able to download the component in Delphi 2007 format. I have now managed to port that to 2009 so it compiles only with warnings and no errors. So all is good at this moment. Now I am trying to install the component into the IDE by using the install menu option from the project manager. This is where I run into errors. ...

IP/UDP ports for pure IP login.
Hi, We have a ISA server between a pure IP Novell network, and we want clients to login into the servers behind the Microsoft ISA server. I have setup SLP on the servers, and one server is the Directory Agent server. I have set this DA into the clients (static). Now i need to open up the right ports to be able to login. What i know is : 524UDP 524TCP 427UDP 427TCP 2302UDP What do i need more, because for now i'm not able to login. Thanks in advance, Bastiaan. Bas, Is NAT running on the ISA server? If so, you cannot make an NCP connection over N...

Unique Problem
ASP newbie here - Hope someone has some insight. I've checked the threads for multiple communities, and haven't found a solution that works for me nor a description of a problem just exactly like this. I have two websites - lucidmoment.com and blossomhillcollies.com They work on the same server using host headers. I have a static page at both of those sites so I know IIS is working. I have installed CSK using blossomhillcollies.com, and that community seems to work fine. Using ISPAdmin, I tried adding a community for lucidmoment.com - that site either doesn't work or I am t...