PC Review


Reply
Thread Tools Rate Thread

what is the best way to pass data in socket with limited bandwidth

 
 
chrisben
Guest
Posts: n/a
 
      30th Apr 2009
Hi,

I have a bunch of data with basic structure as
class A{
public string;
public float:
public DateTime;
public int;
}

I originally pass it by socket as a xml string. However, due the large
volume of data and limited bandwidth, it seems not an efficient way. So in
C#, what is the best way to pass the data in socket with a compressed size?
Thanks

Chris
 
Reply With Quote
 
 
 
 
sloan
Guest
Posts: n/a
 
      30th Apr 2009

http://www.informit.com/guides/conte...net&seqNum=210
The binary formatter produces the smallest serialization stream.





"chrisben" <(E-Mail Removed)> wrote in message
news:7F296AAD-211E-498B-970D-(E-Mail Removed)...
> Hi,
>
> I have a bunch of data with basic structure as
> class A{
> public string;
> public float:
> public DateTime;
> public int;
> }
>
> I originally pass it by socket as a xml string. However, due the large
> volume of data and limited bandwidth, it seems not an efficient way. So in
> C#, what is the best way to pass the data in socket with a compressed
> size?
> Thanks
>
> Chris



 
Reply With Quote
 
chrisben
Guest
Posts: n/a
 
      30th Apr 2009
thanks. the link is helpful.

"sloan" wrote:

>
> http://www.informit.com/guides/conte...net&seqNum=210
> The binary formatter produces the smallest serialization stream.
>
>
>
>
>
> "chrisben" <(E-Mail Removed)> wrote in message
> news:7F296AAD-211E-498B-970D-(E-Mail Removed)...
> > Hi,
> >
> > I have a bunch of data with basic structure as
> > class A{
> > public string;
> > public float:
> > public DateTime;
> > public int;
> > }
> >
> > I originally pass it by socket as a xml string. However, due the large
> > volume of data and limited bandwidth, it seems not an efficient way. So in
> > C#, what is the best way to pass the data in socket with a compressed
> > size?
> > Thanks
> >
> > Chris

>
>
>

 
Reply With Quote
 
sloan
Guest
Posts: n/a
 
      30th Apr 2009

You should also consider a WCF service with tcp

http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!158.entry

That is a quick demo I wrote up............that gives you "true" DotNet
objects on both sides of the "wire".





"chrisben" <(E-Mail Removed)> wrote in message
news:04577027-6283-42FF-A9E7-(E-Mail Removed)...
> thanks. the link is helpful.
>
> "sloan" wrote:
>
>>
>> http://www.informit.com/guides/conte...net&seqNum=210
>> The binary formatter produces the smallest serialization stream.
>>
>>
>>
>>
>>
>> "chrisben" <(E-Mail Removed)> wrote in message
>> news:7F296AAD-211E-498B-970D-(E-Mail Removed)...
>> > Hi,
>> >
>> > I have a bunch of data with basic structure as
>> > class A{
>> > public string;
>> > public float:
>> > public DateTime;
>> > public int;
>> > }
>> >
>> > I originally pass it by socket as a xml string. However, due the large
>> > volume of data and limited bandwidth, it seems not an efficient way. So
>> > in
>> > C#, what is the best way to pass the data in socket with a compressed
>> > size?
>> > Thanks
>> >
>> > Chris

>>
>>
>>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
socket packet size = bandwidth? Zytan Microsoft C# .NET 2 25th Jul 2008 01:12 AM
Limit reception socket bandwidth George Microsoft Windows 2000 Networking 1 8th Aug 2005 09:39 PM
after opening socket, sending data then closing socket 3000 times i get "Only one usage of each socket address" Daniel Microsoft Dot NET Framework 3 12th Feb 2005 02:53 PM
Bandwidth limited to 1.5 megabits =?Utf-8?B?U2NocmFncw==?= Windows XP General 6 3rd Nov 2004 08:57 PM
VPN and PPTP Bandwidth limited to 28 kbps =?Utf-8?B?d3N0YXlsb3I=?= Microsoft Windows 2000 Networking 1 12th Mar 2004 06:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:57 AM.