I am working on a server client asyn. socket communication via TCP in pocketPC

the program is successfully compiled
and the server and the client is successfully connected
However, when the program execute the command:
Sock.Send( byteDateLine, byteDateLine.Length, 0 );
An exception is caught:
System.InvalidOperationException:InvalidOperationException
What is the problem?

RE: Server Client Asyn. communication by SujitDMello

SujitDMello
Sat Sep 25 12:31:04 CDT 2004

The InvalidOperationException is normally thrown when you attempt an
operation on a Socket that is not yet connected. Are you doing an Async
connect? If so you may be doing the Send before the Connect has completed.

Sujit D'Mello

"questions" wrote:

> I am working on a server client asyn. socket communication via TCP in pocketPC
>
> the program is successfully compiled
> and the server and the client is successfully connected
> However, when the program execute the command:
> Sock.Send( byteDateLine, byteDateLine.Length, 0 );
> An exception is caught:
> System.InvalidOperationException:InvalidOperationException
> What is the problem?