Cheers..but I have searched most places without finding anything to do with
sending strcutures through sockets.
Most examples use for example
NetworkStream serverSockStream = new NetworkStream(serverSocket);
serverStreamWriter = new StreamWriter(serverSockStream);
serverStreamReader = new StreamReader(serverSockStream);
serverStreamWriter.WriteLine("Hi!");
serverStreamWriter.Flush();
This is ok for sending string messages but what about sending and receiving
data structures???
"Carlos J. Quintero [.NET MVP]" <carlosq@NOSPAMsogecable.com> wrote in
message news:OFYozIuVFHA.3140@TK2MSFTNGP14.phx.gbl...[color=blue]
> You have to use the TcpClient class of the System.Net.Sockets namespace.
>
> Search in Google "TcpClient .NET" to get samples.
>
> --
>
> Best regards,
>
> Carlos J. Quintero
>
> MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
> You can code, design and document much faster.
> Free resources for add-in developers:
>
http://www.mztools.com
>
> "WAkthar" <wakthar@hotmail.com> escribió en el mensaje
> news:%23cZhM4tVFHA.3488@tk2msftngp13.phx.gbl...[color=green]
>>I am in the process of converting an MFC client and server application to
>>C#.
>>
>> The communication between the client and server was done using simple
>> WM_COPYDATA. I want to use sockets for the C# version.
>>
>>
>>
>> Can someone show me how to send and receive data structures using
>> sockets?
>>
>> A simple client and server example would be much appreciated.
>>
>>
>>
>> Thanks in advance.
>>
>>
>>[/color]
>
>[/color]