Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java threads!!!

Reply
Thread Tools

java threads!!!

 
 
pavs
Guest
Posts: n/a
 
      02-22-2005
hey..

Can a thread read from two ports simultaneously ( in java)????

Also how can i change the port to which a thread is listening to
dynamically, if at all it can be done (in java)???

 
Reply With Quote
 
 
 
 
Stefan Schulz
Guest
Posts: n/a
 
      02-23-2005
On Tue, 22 Feb 2005 12:25:51 -0800, pavs wrote:

> hey..
>
> Can a thread read from two ports simultaneously ( in java)????
>
> Also how can i change the port to which a thread is listening to
> dynamically, if at all it can be done (in java)???


While i am not sure what exactly you mean, i guess you have so far created
threads that do nothing more then reading input from one Socket object. If
this is the case, take a look at the java.nio package.

--
In pioneer days they used oxen for heavy pulling, and when one ox
couldn't budge a log, they didn't try to grow a larger ox. We shouldn't
be trying for bigger computers, but for more systems of computers.
--- Rear Admiral Grace Murray Hopper

 
Reply With Quote
 
 
 
 
John C. Bollinger
Guest
Posts: n/a
 
      02-23-2005
pavs wrote:

> Can a thread read from two ports simultaneously ( in java)????


In any language, one thread does exactly one thing at a time. That's a
key part of the definition of the concept.

> Also how can i change the port to which a thread is listening to
> dynamically, if at all it can be done (in java)???


There is no answer to the question at this level of generality. You
must first define rather specifically -- best by means of source code --
what it means for a thread to be "listening" to a "port".

--
John Bollinger
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
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
Hot Requirements: 1.Sr Java Developer,2.Java Developer (Java with EJB) Isaac Java 0 01-20-2011 08:41 PM
hey i am just started java,, can anyone tell me the use ,application, why java , importance of java.. manish sahu Java 3 02-14-2008 12:00 AM
[JAVA] [EVALUATION] - The Java Failure (Sorry: The Java(tm) Failure) Ilias Lazaridis Java 0 02-01-2005 10:32 AM
JAVA VIRTUAL MUCHINE OR SUN JAVA Fernando Kohan Firefox 1 11-14-2004 02:04 AM
Job to convert Java App 1.3.1 to Java Newest of Java Michael Kintner Java 0 11-30-2003 04:42 AM



Advertisments