NetWork Stream problem.. i gave up :(

  • Thread starter Thread starter mulham.haffar
  • Start date Start date
M

mulham.haffar

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.
 
Hi,

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.
 
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]

|
|
| 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.
|
 

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

Back
Top