Board index » delphi » Using multilple Ports on client simultanously?

Using multilple Ports on client simultanously?

Hi Folks! After hours of testing and debugging I now hav'nt any idea what's
wrong :( Using NMStrmServ / NMStrm I built a server and a client
application, sending and receiving data as streams. The default port I use
on the Server (NMStrmServ) is 8999. There is one main application,
connecting to the server, using port 8999 too. This main application can
start multiple client modules. Each module has a module id between 9000 and
9999 which is used as port number for the module. During connection the
module sends it's port-number to the server, which tries to send data to
this port in return. In the de{*word*81} I can see that the NMStrm-component of
the servers changes it's port-number to the module's port correctly, BUT THE
WRONG SERVER (port 8999) GET'S THE DATA ?!??

What the hell is wrong here ??? PLEASE help, if anybody can!!

Thanx in advance
Detlev Moehring

 

Re:Using multilple Ports on client simultanously?


Did I get it right?

-One server listens to Port 8999
-One client connects to this server
-All client modules connect to this server and send their port numbers
-The server responds to this client modules
-There is only one server component to handle all those connections?

If all the above is right, then I see no problem with the code and the
behaviour you mentioned. If there is only one server then obviously this
server will always listen to port 8999 even if it's sending data to other
ports (that's the difference between the local port and the remote port -
local ports stays 8999 remote port can be different for every client)

Andy

Other Threads