Windows Sokets (tcpclient) problem.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



hi..
im writing an application that uses tcpclient/tcplistener to send file
via network, what im doing is dividing the file into small parts each
part equals the buffer size (8192) and send the parts sequentialy.
the problem is :
the listener is detecting a stream to be read once every two times the
sender sends a stream.
I triend to fix it by sending one byte {0} before each send function
and it worked because the listener ignores the first send (which is the

0 byte) then detects the next send which is the acutaul data, but i
realized that the 0 byte is still in the buffer so its attached the
next stream read.
any help? any idea is appreciated .. thank you in advance.

.



Relevant Pages

  • Windows sockets (tcpclient) problem.
    ... part equals the buffer size and send the parts sequentialy. ... sender sends a stream. ... and it worked because the listener ignores the first send (which is the ...
    (microsoft.public.dotnet.languages.vb)
  • Windows Sokets (tcpclient) problem.
    ... part equals the buffer size and send the parts sequentialy. ... sender sends a stream. ... and it worked because the listener ignores the first send (which is the ...
    (microsoft.public.dotnet.framework)
  • Windows Sockets (TCPClient) problem.
    ... part equals the buffer size and send the parts sequentialy. ... sender sends a stream. ... and it worked because the listener ignores the first send (which is the ...
    (microsoft.public.dotnet.academic)
  • Re: Windows Sokets (tcpclient) problem.
    ... what im doing is dividing the file into small parts each ... > part equals the buffer size and send the parts sequentialy. ... > sender sends a stream. ... > and it worked because the listener ignores the first send (which is the ...
    (microsoft.public.vb.general.discussion)
  • Re: I/O buffering
    ... StreamReader also buffers data? ... so they buffer as well. ... Neither StreamReader nor StreamWriter inherit from FileStream. ... What StreamReader and StreamWriter _do_ use is any Stream instance. ...
    (microsoft.public.dotnet.languages.csharp)