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

  • Home
  • SEARCH
  • 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 6048225
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:26:22+00:00 2026-05-23T07:26:22+00:00

I have socket program which sends a file from socket client to socket server

  • 0

I have socket program which sends a file from socket client to socket server and create the file on the server

There is no problem in sending the file to the server… [Not corrupted]

But,

Im my code : (Server listening and receive data )

this.buffer = new byte[1000000];
 this.DataSocket.Receive(this.buffer, this.buffer.Length, SocketFlags.None);

So always 1000000 bytes are received from the client to server which always the file created in the server has a fix size value .. also larger than the original file.

most fuzzy thing is file MD5 hashes are different… because of this fixed buffer as i think

my problem is how i cant send the file to the server with the same MD5 Hash ?

  • 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-05-23T07:26:23+00:00Added an answer on May 23, 2026 at 7:26 am

    I think this may be because the MD5 is begin created with the entire buffer you have created. If the data is only 50000 bytes long but the buffer is 1000000 I assume these would create different hash values.

    If I remember correctly the receive method returns an int which should be the size of the data that you have received. You could create a new byte array and copy the received data into an array which is the exact same size as the original file.

    Hope this helps.

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

Sidebar

Related Questions

I have a java program which has a server-socket listening infinitely. In case of
I have a server that sends data via a socket, the data is a
I want to create a server and client that sends and receives UDP packets
I have a problem with my Java program. It has a socket connection between
A socket client program establishes a connection with the server, writes some bytes and
I have a class that encapsulates tcp socket communications with a server. For each
We have a simple project where we read data from a socket and we
I have a server that listens for a connection on a socket: public class
I have a class which I'm serialising to send over a unix socket and
I want to open a TCP client socket in Python. Do I have to

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.