how a dataset can transfer from server to client using socket programming in C#
-
how a dataset can transfer from server to client using socket programming in C#. Is it possible?
-
how a dataset can transfer from server to client using socket programming in C#. Is it possible?
-
Create a NetworkStream between the two computers and serialise the DataSet across it. Use a CryptoStream if you need security
Please send some example code related to this.
-
Please send some example code related to this.
-
Please send some example code related to this.
If I do that, you won't learn from it. The most that you will get out of me is some pseudo-code Client Start listening on port x Set up a background thread. When you receive data, use TcpClient.GetStream to get the NetworkStream Deserialise the NetworkStream into a DataSet Close the NetworkStream and TcpClient Server Accept an IP address Try to connect to the IP address, on port x (this is the same port as the client) When you have connected, simply use the same TcpClient.GetStream method as a data sink. Serialise the DataSet into this Stream Close the NetworkStream and TcpClient If you really wanted to, you could make this more complex (status codes, etc), but that's the basic gist of it. If you need code, then search Google for a simple chat application (this gets you the basic infrastructure) and serialisation (this will cover the transfer of the DataSet)