T
T
TheRevan2017-05-01 11:51:25
Java
TheRevan, 2017-05-01 11:51:25

How is the event interaction between client and server in java?

How is the event listener written on the java ServerSocket depending on the parameters passed? Does everything really happen through the transfer of textual information by the InputStream getInputStream method, etc. Are there code examples or finished projects to see what's there and how?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ivan19631224, 2017-05-02
@TheRevan

Does everything really happen through the transfer of textual information by the InputStream getInputStream method, etc.

Yes, something like this is, but not textual, but binary, as a rule. Another thing is that, firstly, it all turns into a bunch of layers of abstractions to make it more convenient to work with. Secondly, getInputStream is for synchronous I / O, there is also asynchronous, everything is somewhat more complicated there.
To solve various problems of client-server interaction, there are many libraries and frameworks. I recommend you look into netty , try tutorails etc. to understand how it works.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question