🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7878

Server that listens to a port

#7878
From: ArShAm
Date: Wed, 09 May 2001 16:33
21 lines
1826 bytes
Hi there

How to listen to a port , while 3 clients wait for accept that ? and how to
handle the inputs?
Is there any events that can handle the ports for inputing?
Which method for threading is better?
    1.Each objects(each clients has an object to read from and write to) has
a thread for itself , and in run() method , it invoke yeld()
    2.The main class controls the threads


    Can I do this?( if I can , this is the best Idea I think ) :
each clients when send a msg to a port , it contains a code for client , and
the server then knows the data is belongs to which client , and invoke the
methods of the client class.If I can do this , how to listen to a port , and
the other way , how to accept the port? I want to get a password from
clients , and then if password was incorrect , close the connection of the
client.

Thanks
    ArShAm
Technical Details
Message-ID: <3afac731_2@dnews>
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!news.tele.dk!194.255.56.67!newsfeed101.telia.com!kinglear.mobilixnet.dk!opentransit.net!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,43e608b758a1dc81,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-05-10 10:10:38 PST
From: "ArShAm" <ArShAm_MeTaL@hotmail.com>
Newsgroups: borland.public.jbuilder.java.language
Subject: Server that listens to a port
Date: Wed, 9 May 2001 21:03:16 +0430
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700
NNTP-Posting-Host: 61.11.252.152
Message-ID: <3afac731_2@dnews>
X-Trace: dnews 989513521 61.11.252.152 (10 May 2001 09:52:01 -0700)
Path: arc1-ca.pugleaf.net!newsfeed.google.com!sn-xit-03!supernews.com!cyclone-sjo1.usenetserver.com!news-out-sjo.usenetserver.com!news.tele.dk!194.255.56.67!newsfeed101.telia.com!kinglear.mobilixnet.dk!opentransit.net!newsfeeds.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews