Article View: borland.public.jbuilder.java.api
Article #560Sockets and Client/Server applications
From: Alan Shiers
Date: Sun, 08 Jun 2003 14:52
Date: Sun, 08 Jun 2003 14:52
19 lines
1941 bytes
1941 bytes
Hi there, It maybe that Sun has hidden the implementation from us when they made the java.io.Socket and java.io.ServerSocket classes, but out of curiosity, I was wondering how a socket is able to distinguish incoming data as belonging to a specific ongoing process? In other words, in a client/server application, it is possible that you could have two or more clients logged on to the server application simultaneously. Naturally, it is possible to assume that, for each client logged on, each would be sending and receiving different pieces of data all at the same time. This being the case, is the Socket or ServerSocket class able to distinguish the fact that certain incoming data is intended as a request from Client2 and not from Client3? After all, they all obtain their InputStreams and OutputStreams in the same manner by calling the respective methods of the Socket or ServerSocket classes [getInputStream() or getOutputStream()]. Alan
Technical Details
Message-ID:
<3EE34D95.E0767B34@hfx.eastlink.ca>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,21183e92a0cd9ddc,start X-Google-Attributes: gid1089d0,public X-Google-ArrivalTime: 2003-06-08 07:56:16 PST Message-ID: <3EE34D95.E0767B34@hfx.eastlink.ca> Date: Sun, 08 Jun 2003 11:52:05 -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: Sockets and Client/Server applications Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 24.222.101.2 X-Trace: newsgroups.borland.com 1055083997 24.222.101.2 (8 Jun 2003 07:53:17 -0700) Lines: 19 Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-08!supernews.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail