473,513 Members | 2,356 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do you send and recieve multidimensional byte arrays from a client to a server?

1 New Member
Hi guys...

I've posted this question on dreamincode.net but I think I'll find more help here.

Heres the original post if anyone wants to see it.
dreamincode.net post

I'm really just trying to find an extremely simple way to send 3 strings from my client to my server.

Whatever the server does with those strings afterwards is irrelavent...

If you need to know: The server will be using the 3 strings to register a user on a mysql db.

Anyway.. yeah.. my question is:
How do you send and recieve multidimensional byte arrays from a client to a server?
Mar 11 '11 #1
1 2038
GaryTexmo
1,501 Recognized Expert Top Contributor
Someone else might be a better choice to answer this since networking is not my strong suit at all! That said, I can try to offer an idea...

You're in control of what you send and receive over the network, so you can send yourself codes to drive a state machine. Something like...

* Receiver waiting for data
* Data received , value of 100. Client interprets this as an array of strings incoming.
* Next value received, number of string arrays coming
* Next value, number of characters coming for that string
* Next n values, characters in that string
* Repeat last two until you have the required strings
* Package data and send to appropriate place
* Reset state back to awaiting command code

Knowing next to nothing about networking, that's probably how I would approach it. It may not be the best solution ;)
Mar 11 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2165
by: Matt | last post by:
I wrote the tcp socket client-server program that the server will echo the message received from the client. In client program: char sendBuf; while(1) { cout << "Enter message:";...
7
6734
by: War Eagle | last post by:
I have two byte arrays and a char (the letter S) I was to concatenate to one byte array. Here is what code I have. I basically want to send this in a one buffer (byte array?) through a socket. ...
6
3089
by: ad | last post by:
I have a compressed file in client. How could we send this compressed file (.zip) to server by web service?
0
2153
by: Harley | last post by:
Hello, I am just learning the tcp/ip functions etc under vb.net so please look over me if this is obviouse. I have been all over looking into any functions that I didn't totaly understand and...
2
1777
by: Vince Castellano | last post by:
Hello, What is the proper way to send byte arrays (or strings for that matter), from a C DLL to VB? I have tried by prototyping the call in VB with ByRef Byte as a parameter, then treating it in...
3
20768
by: Clayton | last post by:
Hi all, I'm trying to send an image using a TCP socket. The client connects to the server without any problems and start to receive the data. The problem is when I try to convert the stream to...
9
2425
by: mickadoo | last post by:
I'm trying to send 15000 packets using a basic client/server and measure the delays but after so many packets sent it starts going a bit out of sync. The client always reports sending 320bytes but...
5
2765
by: Cichy | last post by:
Hello, I'm writing a Client-Server application using sockets (asynchronous). There is a Server (Master) which accepts incoming connections, and Client (Slave). Afetr establishing connections...
11
4862
by: Jeff | last post by:
Hello everyone. I've searched through the archives here, and it seems that questions similar to this one have come up in the past, but I was hoping that I could pick your Pythonic brains a bit. ...
2
4084
by: nsaffary | last post by:
hi I hava a client/server program that run correctly when i run it in one computer(local) but when I run client on a one computer and run server run on another, connection does not stablish.(I set...
0
7267
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,...
0
7391
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7553
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...
1
7120
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...
0
7542
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...
0
5697
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4754
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...
1
809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.