🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #1792

Re: Quick question about sockets.

#1792
From: Alex Colic
Date: Fri, 07 Sep 2001 12:32
26 lines
1818 bytes
Hi,

Ok I am obviously doing something wrong. I picked the ServerSocket  class
because I do not know what host is going to send me commands, just the port.

Any idea how I can have more than one class just listen to the same port for
commands?

Alex

"Torsten Welches" <torsten.welches@who.cares.netcologne.de> wrote in message
news:3b9859d6$1_2@dnews...
>
> "Alex Colic" <alex.colic@pop-ware.com> wrote:
>
> >I have created a class that has a thread that listens on the
> >socket for msgs. So far this has worked for me but when I have
> >more than one app installed on the same machine I get net bind
> >exceptions that the port is already taken.
>
> It's just like the exception says - you can bind each port
> number to exactly one ServerSocket on each machine. If you are
> to run multiple server each would have to use a different port.
>
> Torsten
>
Technical Details
Message-ID: <3b98be46$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3b97d61e_1@dnews> <3b9859d6$1_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,75eb349919d2da57
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2001-09-07 05:42:20 PST
From: "Alex Colic" <alex.colic@pop-ware.com>
Newsgroups: borland.public.jbuilder.java.api
References:  <3b97d61e_1@dnews>  <3b9859d6$1_2@dnews>
Subject: Re: Quick question about sockets.
Date: Fri, 7 Sep 2001 08:32:04 -0400
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 24.150.29.218
Message-ID: <3b98be46$1_2@dnews>
X-Trace: dnews 999865926 24.150.29.218 (7 Sep 2001 05:32:06 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!213.56.195.71!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews