Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Running 2 client programs simultaneously

Reply
Thread Tools

Running 2 client programs simultaneously

 
 
janicehwang1325@yahoo.com
Guest
Posts: n/a
 
      06-14-2006
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?

 
Reply With Quote
 
 
 
 
usenet@DavidFilmer.com
Guest
Posts: n/a
 
      06-14-2006
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> 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:
>>> my server program will only allow one client program to connect.


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

--
David Filmer (http://DavidFilmer.com)

 
Reply With Quote
 
 
 
 
janicehwang1325@yahoo.com
Guest
Posts: n/a
 
      06-14-2006
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!

(E-Mail Removed) wrote:
> (E-Mail Removed) wrote:
> > 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:
> >>> my server program will only allow one client program to connect.

>
> 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).
>
> --
> David Filmer (http://DavidFilmer.com)


 
Reply With Quote
 
Jürgen Exner
Guest
Posts: n/a
 
      06-14-2006
(E-Mail Removed) wrote:
> 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


 
Reply With Quote
 
janicehwang1325@yahoo.com
Guest
Posts: n/a
 
      06-14-2006
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.

Jürgen Exner wrote:
> (E-Mail Removed) wrote:
> > 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


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Waiting simultaneously for client connections and Centralserver outputs ahd292 Java 6 04-16-2009 06:52 PM
Problem : Client request is processed simultaneously by two threads ! Olivier Matrot ASP .Net 1 09-12-2007 03:28 PM
"copy running-config startup-config" simultaneously vstots@gmail.com Cisco 4 03-10-2005 06:04 AM
Programs work, but not simultaneously: Problem? Snoopy NZ Computing 11 07-10-2004 02:08 AM
How to Verify Programs Running with Installed Programs? Edge Computer Information 9 01-19-2004 11:35 PM



Advertisments