471,347 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,347 software developers and data experts.

NetWork Stream problem.. i gave up :(



hi guys...

im writing a client/server application that uses tcpclient/tcplistener
to do the comunications...

i defined a tcpclient object called "client" and a networkStream called
"stream"..
stream = client.GetStream()

and the problem is:

every two send actions the listener only recognizes one !!!
i use "stream.write(...)

i fixed the problem by writing the "stream.write(..)" twice each
time... and it worked most of the time... but as u can see its not a
solution after all :)..

any help any opinion will be more than appreciated..

Thanks
Mulham.

Jan 31 '06 #1
2 1040
Hi,

<mu***********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...


hi guys...

im writing a client/server application that uses tcpclient/tcplistener
to do the comunications...

i defined a tcpclient object called "client" and a networkStream called
"stream"..
stream = client.GetStream()

and the problem is:

every two send actions the listener only recognizes one !!!
i use "stream.write(...)

i fixed the problem by writing the "stream.write(..)" twice each
time... and it worked most of the time... but as u can see its not a
solution after all :)..

any help any opinion will be more than appreciated..


Why don't you post some code, both the sender and receiver side.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Jan 31 '06 #2
You really need to post some code (simple and complete sample showing the
issue). Your double write() is not a solution to this, there is something
else going on. Are you doing async reads on the server and dropping some?
It could be many things.

--
William Stacey [MVP]

<mu***********@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
|
|
| hi guys...
|
| im writing a client/server application that uses tcpclient/tcplistener
| to do the comunications...
|
| i defined a tcpclient object called "client" and a networkStream called
| "stream"..
| stream = client.GetStream()
|
| and the problem is:
|
| every two send actions the listener only recognizes one !!!
| i use "stream.write(...)
|
| i fixed the problem by writing the "stream.write(..)" twice each
| time... and it worked most of the time... but as u can see its not a
| solution after all :)..
|
| any help any opinion will be more than appreciated..
|
| Thanks
| Mulham.
|
Jan 31 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Yechezkal Gutfreund | last post: by
5 posts views Thread by Baren | last post: by
3 posts views Thread by Sir Psycho | last post: by
reply views Thread by Ronak mishra | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.