Running 2 client programs simultaneously

J

janicehwang1325

hi expert,

Currently, I have a server program running localhost. Then i have 2
separate client programs that will connect to the server at the same
time. However, my server program will only allow one client program to
connect. If there is another program from the same IP connect, it will
exit. Is it the program becoz of the client is using same identity to
connect to the server making the server exit itself? FYI, i had tested
the server progarm (it's multitaking using thread) and having
connection from different user having no problem. If i would like to
run the server to accept connections from clients from the same IP is
that possible?
 
U

usenet

However, my server program will only allow one client program to
connect. If there is another program from the same IP connect, it will
exit. Is it the program becoz of the client is using same identity to
connect to the server making the server exit itself?

No. You have already diagnosed your problem:
Now you need to review your server program source code and figure out
WHY that is so. There is no inherent limitation which prevents a server
from accepting multiple connections from the same host (even from
localhost), so there is apparently a limitation imposed by your server
program's logic.

By the way, "becoz" is spelled b-e-c-a-u-s-e. This newsgroup is more
"professional" in tone than many others, and you might find that you
will annoy many of the folks in this newsgroup if you use cutsie
abbreviations (whereas you will annoy no one if you do not).
 
J

janicehwang1325

So it's my server program problem that prevent the multiple connections
from the same host? for your information, all the client and server
program i run is running as daemon. when i try to run the server on
another machine like 10.11.10.22 and the client at 10.11.10.11, it
creates no problem. However, when i put the server same as the client
at 10.11.10.11, the problem occur.

I realized that the connection is done but the connection is gone once
the second client connect to it and the error message that i can get is
"segmentation fault (core dumped)". I tried to look into the code and
now running the server program using different port number. The program
is fine. However, i believe running using different port number isn't
an ultimate solution.

Thanks for the remind. I will be aware of my usage of abbreviation!
 
J

Jürgen Exner

hi expert,
Where?

Currently, I have a server program running localhost. Then i have 2
separate client programs that will connect to the server at the same
time. However, my server program will only allow one client program to
connect. If there is another program from the same IP connect, it will
exit.

Well, you are not telling us what kind of server you are talking about. HTTP
maybe?
If so, then your observation is rather strange, because normally web servers
would simply fork off a new thread or process to handle each incoming
request and they don't care about how many requests a single requestor
sends.
Is it the program becoz of the client is using same identity to
connect to the server making the server exit itself?

I've never heard of a program becoz, maybe you can ask the manufacturer of
this program?

Anyway, what does this have to do with Perl?

jue
 
J

janicehwang1325

for more information, my client and server program are both writing in
Perl using IO::Socket::SSL. Both of them will be running as daemon.The
server is actually split the log messages from different client and
save into database according to their type.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,297
Messages
2,571,529
Members
48,250
Latest member
Bette22B13

Latest Threads

Top