473,699 Members | 2,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Interpolate byte array from 64 bit linux app

Hi,

I have a client app which directly read the byte stream from the
socket, which is sent from linux 64 bit server app.
One problem I have is that I realize that it seems like the minimum
size for the data sent from linux is 4 bytes. even though the server
only sent one char. Any short type data is 8 bytes also (instead of 2
bytes as expected in 32bit system).

One of the reason to use binary array is to reduce the message
traffic. However, it seems unachievable from a 64 bit system.

I sent a lot of data and hope to reduce the size as much as possible,
but still using the 64 bit server. Any suggestions?

Thanks

Chris
Aug 12 '08 #1
1 1790
tr******@yahoo. com wrote:
I have a client app which directly read the byte stream from the
socket, which is sent from linux 64 bit server app.
One problem I have is that I realize that it seems like the minimum
size for the data sent from linux is 4 bytes. even though the server
only sent one char. Any short type data is 8 bytes also (instead of 2
bytes as expected in 32bit system).

One of the reason to use binary array is to reduce the message
traffic. However, it seems unachievable from a 64 bit system.

I sent a lot of data and hope to reduce the size as much as possible,
but still using the 64 bit server. Any suggestions?
Perhaps try posting to a relevant newsgroup, like from the
'comp.os.linux. *' hierarchy...

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Aug 12 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
10305
by: Hal Vaughan | last post by:
If I have a byte and I convert it to string (String sData = new String(byte bData), then convert it back (byte bData = sData.getBytes()), will all data be intact, or do Strings have problems with bytes that are not printable characters? I've tested this and it seems to work fine, but I want to make sure there isn't some condition or situation I'm not aware of that could cause problems. I'm doing this because it's easier to do some of my...
2
3842
by: Alex | last post by:
Hi, I need to perform cubic spline interpolation of a dataset. I am using scipy. When I pass two arrays (x,y) to the interpolate.splrep(x,y) function I get the following traceback Traceback (most recent call last): File "./optmat.py", line 138, in ? initspline = interpol.getspline(initkeys,inittable) File "./optmat.py", line 77, in getspline
16
16416
by: Khuong Dinh Pham | last post by:
I have the contents of an image of type std::string. How can I make a CxImage object with this type. The parameters to CxImage is: CxImage(byte* data, DWORD size) Thx in advance
9
10962
by: James Vanns | last post by:
First, Sorry for the cross-post :p OK, in Linux I can obtain the MAC address using socket(), ioctl() etc. and a few data structures. No problem. However, the resulting MAC is stored in a 14 byte char array (sockaddr.sa_data). However, a MAC address is 48-bits! The MAC (as in the char array) is obviously the printable form of: 00efc8346b72
0
8691
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8920
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8887
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5877
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4633
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2351
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2012
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.