Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9049011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:17:17+00:00 2026-06-16T12:17:17+00:00

I use Binary Serialization Object to Read or Write Data Stream and previously if

  • 0

I use Binary Serialization Object to Read or Write Data Stream and previously if we are going to write/read them we have to compile the “instance class” to be DLL file so we have same Assemblies between them, is it right?

well now, here is my problem:

this is my Binary Sender Code

public void SendBinarySerial(object graph)
{
    IFormatter formatter = new BinaryFormatter();

    System.Net.Sockets.NetworkStream strm = mClient.GetStream(); //get TCPclient stream

    formatter.Serialize(strm, graph);
}

and here is my Binary Receiver code:

private void doRead()
{
    do 
     {
       if (mClient.GetStream().CanRead) 
          {
             System.Net.Sockets.NetworkStream strm = mClient.GetStream();

              IFormatter formatter = new BinaryFormatter();

              object mydat = (object)formatter.Deserialize(strm);//deserialize data receiver         
           }
    } while (true);
}

And this is my “instance class” code that i want to send to the entire of clients.
ok Let’s consider the following code:

[Serializable()]
public class DataSend
{
    public List<Bitmap> MainData = new List<Bitmap>();
    public List<string> Title = new List<string>();
}

As you can see , there are several List Variables such as Bitmap and string.
the Bitmap data is for image data. if I fill it with many images it will increase the size of variable memory, maybe about 20 mb.

After that I’m about to send them to the entire of clients. Well, here is my question:

Using this technique, if the size object is about 20 mb, will this Work well? I know that Socket Communication has a size limit for sending data

I don’t want to define any protocols at all, I just want to use Socket Communication although maybe this is not best way.

Thanks for your response.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T12:17:18+00:00Added an answer on June 16, 2026 at 12:17 pm

    I wouldn’t worry about size limits using sockets. From my experience it’s possible to read/write arbitrary sizes from or to NetworkStream. I would however worry about the serializability of the Bitmap objects. As far as i know this will not serialize the image data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Binary Search Tree, I use template to add any class object
We use .net binary serialization right now to serialize data to persist. It does
For Binary serialization I use public ClassConstructor(SerializationInfo info, StreamingContext ctxt) { this.cars = (OtherClass)info.GetValue(Object,
I have an actionscript class that serializes and unserializes data compatible with php's serialization
I need to use a binary data in a transformation as an integer and
I am trying to use NSURLRequest with NSURLConnection to establish a binary stream connection
I have object A and object B deserialized from binary files. B has a
I have the next problem: I have a big object graph being binary serialized
I know that if I use binary serialization with WCF I lose interopability. If
I have the following object: [Serializable] public class ExampleImage { public int ID {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.