Click here to Skip to main content
16,004,782 members
Home / Discussions / C#
   

C#

 
GeneralRe: Matrix class Pin
Royaeh kohestan22-Jun-04 20:41
Royaeh kohestan22-Jun-04 20:41 
GeneralRe: Matrix class Pin
Heath Stewart22-Jun-04 20:48
protectorHeath Stewart22-Jun-04 20:48 
GeneralYou are right! Pin
Royaeh kohestan22-Jun-04 21:12
Royaeh kohestan22-Jun-04 21:12 
GeneralTabControl Question Pin
bneacetp22-Jun-04 17:15
bneacetp22-Jun-04 17:15 
GeneralRe: TabControl Question Pin
Heath Stewart22-Jun-04 19:17
protectorHeath Stewart22-Jun-04 19:17 
GeneralRe: TabControl Question Pin
bneacetp22-Jun-04 19:26
bneacetp22-Jun-04 19:26 
GeneralProblem of developing c/s program using c# Pin
chansion22-Jun-04 16:08
chansion22-Jun-04 16:08 
GeneralRe: Problem of developing c/s program using c# Pin
Heath Stewart22-Jun-04 16:28
protectorHeath Stewart22-Jun-04 16:28 
For one, you could eliminate the need to define your own protocol if you use XML Web Services or .NET Remoting. A DataSet will be serialized to XML automatically by the Web Services and .NET Remoting serialization (XML Serialization and Runtime Serialization, respectively).

If you want to transfer something immediately, then do so. I guess I don't see what the problem is. If your client/server communication is two way (like you're own socket programming), then just send the data to the client.

For a DataSet, it's really quite easy. Create a new MemoryStream and call DataSet.WriteXml passing the MemoryStream. Now you can read the contents of the MemoryStream into a byte[] array. You could also use a StringWriter then encode the resulting string using the Encoding of your choice to get the bytes and send them down the wire.

If you're using XML Web Services or .NET Remoting via an HTTP channel, then communications is - by design - client-request/server-response only. A server cannot send the client something unless the client requests it, since the client establishes the connection. If you use .NET Remoting using an TCP channel (or a custom transport sink, which then it depends on the implementation), you can send data from the server to the client if the client has registered a sponsor with the server (or used some proprietary means of the server keeping a reference to the client).

If you need more help, please be more specific.

 

Microsoft MVP, Visual C#
My Articles
GeneralA collection of instances that can be changed Pin
XanderSon22-Jun-04 13:39
XanderSon22-Jun-04 13:39 
GeneralRe: A collection of instances that can be changed Pin
Heath Stewart22-Jun-04 16:23
protectorHeath Stewart22-Jun-04 16:23 
GeneralRe: A collection of instances that can be changed Pin
XanderSon23-Jun-04 5:32
XanderSon23-Jun-04 5:32 
GeneralRe: A collection of instances that can be changed Pin
Heath Stewart23-Jun-04 7:22
protectorHeath Stewart23-Jun-04 7:22 
GeneralRe: A collection of instances that can be changed Pin
XanderSon23-Jun-04 15:22
XanderSon23-Jun-04 15:22 
GeneralINSERT Single-Quote Char into DB Tables Pin
Khang Nguyen22-Jun-04 12:53
Khang Nguyen22-Jun-04 12:53 
GeneralRe: INSERT Single-Quote Char into DB Tables Pin
Colin Angus Mackay22-Jun-04 12:57
Colin Angus Mackay22-Jun-04 12:57 
GeneralRe: INSERT Single-Quote Char into DB Tables Pin
Dave Kreskowiak22-Jun-04 13:03
mveDave Kreskowiak22-Jun-04 13:03 
GeneralRe: INSERT Single-Quote Char into DB Tables Pin
Werdna23-Jun-04 7:02
Werdna23-Jun-04 7:02 
GeneralRe: INSERT Single-Quote Char into DB Tables Pin
Heath Stewart13-Mar-05 16:29
protectorHeath Stewart13-Mar-05 16:29 
GeneralAutomatically authenticating with a Web proxy Pin
Arun Bhalla22-Jun-04 12:11
Arun Bhalla22-Jun-04 12:11 
GeneralRe: Automatically authenticating with a Web proxy Pin
Heath Stewart22-Jun-04 16:18
protectorHeath Stewart22-Jun-04 16:18 
GeneralRe: Automatically authenticating with a Web proxy Pin
Arun Bhalla1-Jul-04 7:44
Arun Bhalla1-Jul-04 7:44 
GeneralRe: Automatically authenticating with a Web proxy Pin
Heath Stewart1-Jul-04 17:03
protectorHeath Stewart1-Jul-04 17:03 
GeneralRe: Automatically authenticating with a Web proxy Pin
Arun Bhalla1-Jul-04 7:45
Arun Bhalla1-Jul-04 7:45 
GeneralFile Problem Pin
Peter Vertes22-Jun-04 9:29
Peter Vertes22-Jun-04 9:29 
GeneralRe: File Problem Pin
LongRange.Shooter22-Jun-04 9:50
LongRange.Shooter22-Jun-04 9:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.