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 8821623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:54:07+00:00 2026-06-14T05:54:07+00:00

I have written a single server-client program and I want to ask: Is there

  • 0

I have written a single server-client program and I want to ask: Is there any difference in the behavior of the recv() function between 32 and 64 bit operating systems.

I am asking this because I am running both the server and the client on a 64 bit laptop and everything is working fine. I call recv() this way:while((tmp = recv(client_sock,rec_msg,256,0))>0) and as expected if for example i have 3 strings to send from client,in the server part it enters the while 3 times and prints the right result.

When i run exactly the same programs on a 32 bit Debian machine it seems that for some unknown reason if i send 3 strings for example from client it enters the while loop in server part only one time and receives the 3 strings as one.

I have used print statements and found out that it enters the while loop one time and receive all the buffer although in the client part while loop is entered 3 times as expected and 3 strings are sent in 3 different times. I can’t found a logical reason for why it is working fine on 64 bit and not working in 32 bit and that’s why i am asking this question.

Thanks in advance for your time and your help.

  • 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-14T05:54:08+00:00Added an answer on June 14, 2026 at 5:54 am

    If this is a stream socket, then there are no inherent message boundaries, and there’s no correlation between the messages sent and received. recv() may return part of a message, the whole message, or multiple messages; all that’s guaranteed is that the bytes are received in the same order that they were sent.

    The difference you’re seeing is probably just due to speed differences between the two machines. The 32-bit machine is slower, so in the time it takes to check for data being available on the network all 3 packets have arrived. But the faster 64-bit machine processes the received data from the first packet before the second one arrives.

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

Sidebar

Related Questions

I have written a simple single threaded client server application in Visual C++ .
I have written a quick C++ DLL in Visual Studio, with a single function
I have a PHP program that has been written keeping in mind a single
I have a web scraping application, written in OO Perl. There's single WWW::Mechanize object
I have created a server/client application. Both of them are written in C#. It
I have written a Java server for remote storage (an iSCSI Target). The client
I have a simple fcgi server written in c++ - for now it's single
I would like to have a client-server application written in .NET which would do
I have written a function that sorts a big scale of data. To test
I have written a java program generates lots of files (say txt files) in

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.