0

I wrote a code few days ago that enables the client (on Java) to send an image to the server(on Python) and save it as a blob format in mysql. How can I do this in reverse? How can I send a picture from the server on python to the client on java ( with socket , for example ?)

1 Answer 1

0

You cannot send picture from the server. You can write a client which will retrieve picture from the server. SimpleHTTPserver in Python can answer the url with image. Reading Image with Java is even more easier. Use url what python provides and save it with Java.

Sign up to request clarification or add additional context in comments.

5 Comments

Why not? I don't think he's saying it has to be over HTTP.
Servers send things to clients all the time, without having to receive a request first.
You're getting caught up on the nomenclature. The point is his Python program can open a connection to the Java program. The fact that one is a server for some things doesn't mean it can't be a client for others.
I don't understand, what is wrong with client sending "show picture" and the server's response is the picture ? Why can't this work ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.