You are about to transfer an image over socket communication. Help me!

Asked 2 years ago, Updated 2 years ago, 70 views

I thought about converting photos taken by the client (Raspberry Pi) into bytes and converting the bytes received by sending them to the server (Java) into files.

However, I have some difficulty coding myself, so I ask you a question.

You are about to create a raspberry pie client in c language. Currently, the connection to the server is in one state, and I have transferred normal text. I want to know how to transfer images.

I want to create a Java server, but I want to see the image I received through number 1 on the server. I'd like to know how to view the received image.

I wonder if there are other ways besides socket communication.

socket-communication

2022-09-21 15:40

1 Answers

First If the purpose is simply to study socket communication and make a protocol, it would be better to first decide what rules to use to transmit control messages and data before developing a program.

Second I don't know what it means to see the image received from the server. If you save the data you received during the server program as a file, you will be able to check it on the server If the purpose is to serve the server in a different format, I think we should first decide what form of service - for example, via the Web (HTML).

Third And if you don't have to write C, try writing Raspberry Pie in Python. And if there's no reason to do it with Raw Socket, there are various ways to do it, such as HTTP (web), Netty, and so on, so I think you should consider studying. We recommend that you refer to the following links and find out the relevant libraries/frameworks.

Etc., depending on what purpose, there are quite a few combinations of methods and libraries/frames.

Additional The question is so comprehensive and abstract that I don't know if the answer will help.


2022-09-21 15:40

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.