Ralf Coby

Ranch Hand
+ Follow
since Jan 04, 2018
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
7
Received in last 30 days
0
Total given
35
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ralf Coby

RESOLVED!
This works fiiiinnee!
There is no setKeepAlive(), but actually, this code does what I wanna do!

For anyone, who ist interessted about:

Client:




Server:
3 months ago
I have set setKeepAlive() before the connect-method connects to the server.

Surprisingly, on the one hand, a ACK-Flag hasn't been set by invoking the method.

Now, I get the exception below:



So, the client gets the message from the server, which the Client has send.
Then, I think, the client trys to reconnect to the server, but it isn't possible, because the client has closed its InputStreams and OutputStreams.

On the other hand, this exception tells me, that the client trys to get a "keepAlive"-Connection to the server.

So, i have to figure out how to close the Streams in the right moments.

by now, my code looks like this:

Client:





Server:

3 months ago

Stephan van Hulst wrote:I believe the problem is that you're trying to set KeepAlive after the connection has been established. Try a constructor that doesn't immediately connect to the endpoint (such as the parameterless constructor), call setKeepAlive(), and finally call connect().



Thanks for your help. I will try it tomorrow and then I will reply.

Greetz
4 months ago
Hi,

I have written a little, simple Protocol to test the "setKeepAlive()"-method.

So, a little, simple echo-Server and a client.

I want that the Server keeps the connection to the client stable, wether or not the server has send a message to the client.

So, I try to work with the "KeepAlive()-Method" from the java.net-library.

But I am not able to find any examples with keepAlive() or any documentations.

Here is my example-protocol:

Server:



Client:


I hope you can help me.

Thanks in advance
4 months ago
And thank you for the recommended book!!!
5 months ago
WOW!!! That's EXTREME!!!

Thank you!
5 months ago
Hi and thanks for answering.

I know how to handle http-requests with the apache-http-client.

But I dont know how to implement the htt-protocol to javaFX WebView or JavaFx WebEngine.

For example:



So, if i deploy my code with this html-text, and if I click the button, then nothing happens.

So, i need to know a way how to teach WebView or WebEngine to handle with requests.

For example something like this:

if(signal == 1){
transferValueTo apacheHttpPostClient
}


I just wanna write a little WebBrowser with WebView, WebEngine and apache-http-client
5 months ago
Hi community!

I am working with JavaFx WebView and http-apache-client.

I am asking myself how to set a value from HTML-WebView-Page to an average POJO.

So, if you click the button (PostRequest) it should set an value to a POJO and after this i can handle it with the http-apache-client.

But I dont know how to "translate" a value from a textfield after clicking the button.


Thank you in advance!
5 months ago
Thanks fpr reply,

so I'm going to read the RFCs, inspect some codes and buy a book from Stevens.


Thanks
5 months ago
Hi,
I wanna develope a simple relay smpt-server in java.
But i dont know how to implementate the protocol.

Can you recommend a book to me?


Thank you in advance.


Greetz
5 months ago
Resolved.
I just forgot to push the "build"-button.
6 months ago
Hi community,

I've declared the dependencies below:



And this is my Websocket-Class:



But there is an error with my IDE.
I only can search in my IDE for the dependencies which depends to the annotations.
But my IDE doesnt get import-references.

So, i tried to import the library manually.


But it's not working.


I hope you can help me.

Thank you in advance
6 months ago
So, whatever. Can't help.

I have copied exactly the same sourcecode to a new java-project, and now it runs.

Whatever.

God moves in mysterious ways. Or something like that.
6 months ago
Edit:

The problem occured even with a single GUI.

I am at my wits end
6 months ago
Hi community!

I have several Guis which all depends on a main-gui.
If i choose "Clean and Build" in my Netbeans-IDE, and i try to execute the .jar-file, then nothing happens.

I guss, its because of the several guis.

My gui-code is like this:
Main-Gui:



second Gui:


Third Gui:




Thank you in advance
6 months ago