🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Sockets and Client/Server applications

#575
From: Alan Shiers
Date: Fri, 13 Jun 2003 18:42
27 lines
2325 bytes
 
> What do you mean by "set to the same Port Number"?  Are you talking
> about ServerSockets or client Sockets?  Perhaps if you posted some
> code, it would be a little more clear what you are doing.

Yes, I'm referring to ServerSockets.
Conceptually speaking this is all I'm trying to accomplish:

I want one primary ServerSocket open with DataInputStream and
DataOutputStream classes connected to it, and remains listening to the
Port specified in the application, and for the duration that any Client
may be connected. Then, a separate secondary ServerSocket, which only
gets activated, on the fly, with BufferedInputStream and
BufferedOutputStream classes connected to it. 

The idea being that, the primary ServerSocket is used only to send
integer values (representing Constants defined in the application) back
and forth between the server app and the Client app. And the secondary
ServerSocket is used only to upload/download files at the byte level
only.

So, the question remains, will there be a conflict of data transfer if
both ServerSockets are set to the same IP address and on the same Port
Number?  Is it better to at least have each ServerSocket set to
different Port Numbers to prevent conflict of data transfer?

Alan
Technical Details
Message-ID: <3EEA1B0B.F96AB3D@hfx.eastlink.ca>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail
References: <3EE34D95.E0767B34@hfx.eastlink.ca> <3ee4a9df$1@newsgroups.borland.com> <3EE4B19A.D1A9BF4@hfx.eastlink.ca> <3ee95418$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,21183e92a0cd9ddc
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2003-06-13 11:47:53 PST
Message-ID: <3EEA1B0B.F96AB3D@hfx.eastlink.ca>
Date: Fri, 13 Jun 2003 15:42:19 -0300
From: Alan Shiers <ashiers@hfx.eastlink.ca>
X-Mailer: Mozilla 4.78 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.java.api
Subject: Re: Sockets and Client/Server applications
References: <3EE34D95.E0767B34@hfx.eastlink.ca> <3ee4a9df$1@newsgroups.borland.com> <3EE4B19A.D1A9BF4@hfx.eastlink.ca> <3ee95418$1@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 24.222.101.2
X-Trace: newsgroups.borland.com 1055529825 24.222.101.2 (13 Jun 2003 11:43:45 -0700)
Lines: 27
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail