sending on socket with blocked read; any synchronized problem?

O

Ong Hong Peow

Hi,

I'm not sure if there's a synchronizing problem ... or is it legit op:

At all times, there's a block read( byte[] ) using the InputStream from a
socket on a separate read thread.
On another thread, I'm intending to send out data using the same socket in
question.

is there any issue on such operations?
e.g in the mist of sending out data streams on the socket, there's incoming
streams on the blocked read.


Thanks.
 
G

Gordon Beaton

At all times, there's a block read( byte[] ) using the InputStream
from a socket on a separate read thread. On another thread, I'm
intending to send out data using the same socket in question.

is there any issue on such operations?

Please don't multipost.

There are no issues. As far as the application is concerned, the
socket connection consists of two completely independent streams.

/gordon
 
X

xarax

Gordon Beaton said:
At all times, there's a block read( byte[] ) using the InputStream
from a socket on a separate read thread. On another thread, I'm
intending to send out data using the same socket in question.

is there any issue on such operations?

Please don't multipost.

There are no issues. As far as the application is concerned, the
socket connection consists of two completely independent streams.

I am using SocketChannel for bi-directional TCP/IP
message packets with separate threads for input
and output, and blocking I/O. It works fine for me
at JRE 1.4.2 level.

--
----------------------------
Jeffrey D. Smith
Farsight Systems Corporation
24 BURLINGTON DRIVE
LONGMONT, CO 80501-6906
http://www.farsight-systems.com
z/Debug debugs your Systems/C programs running on IBM z/OS for FREE!
 
O

Ong Hong Peow

Thanks Gordon for the clarification.

Gordon Beaton said:
At all times, there's a block read( byte[] ) using the InputStream
from a socket on a separate read thread. On another thread, I'm
intending to send out data using the same socket in question.

is there any issue on such operations?

Please don't multipost.

There are no issues. As far as the application is concerned, the
socket connection consists of two completely independent streams.

/gordon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top