d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > My New Project For Practice > Chatroom Program
Prev12
Add Reply New Topic New Poll
Member
Posts: 1,039
Joined: Jul 8 2008
Gold: 1,939.50
Feb 21 2017 07:47pm
Don't make them accept the certificate in java. Look at this example of what you want in NODE: https://github.com/socketio/socket.io/tree/master/examples/chat
Member
Posts: 36,123
Joined: Jul 18 2008
Gold: 2,407.00
Feb 21 2017 08:25pm
Quote (waraholic @ Feb 21 2017 08:47pm)
Don't make them accept the certificate in java. Look at this example of what you want in NODE: https://github.com/socketio/socket.io/tree/master/examples/chat



I mean, you want clients to know they are connecting to the correct server.
Member
Posts: 1,039
Joined: Jul 8 2008
Gold: 1,939.50
Feb 21 2017 08:29pm
Quote (Mastersam93 @ Feb 21 2017 09:25pm)
I mean, you want clients to know they are connecting to the correct server.


https://letsencrypt.org/

Edit: Also, they make front end languages for a reason. Is the point of your program to be all in java? That would be an undertaking. Using the correct tool/language for the job.

This post was edited by waraholic on Feb 21 2017 08:31pm
Member
Posts: 36,123
Joined: Jul 18 2008
Gold: 2,407.00
Feb 22 2017 05:50am
Quote (waraholic @ Feb 21 2017 09:29pm)
https://letsencrypt.org/

Edit: Also, they make front end languages for a reason. Is the point of your program to be all in java? That would be an undertaking. Using the correct tool/language for the job.



If you've read my first post then yes, there is a reason; practice with Java.
Member
Posts: 36,123
Joined: Jul 18 2008
Gold: 2,407.00
Feb 25 2017 07:40am
I've been messing with the multi client stuff. I have it working but it's a bit of a mess right now. Putting everything in threads and properly closing them when socket connections are broken is getting unorganized. So I guess that's the next step.
Member
Posts: 36,123
Joined: Jul 18 2008
Gold: 2,407.00
Feb 25 2017 06:33pm
Cleaned up a lot of the error handling but it still needs to be organized more. Spent some time debugging the server program because every time I sent a message it kept saying there was a new connection, but I was dumb because the bug was in the client because I created the client inside the loop.

Now I need to work on how I want to keep track of server socket threads because I think I need one thread to listen for connections and one thread to check for closed connection and delete their corresponding threads. It's starting to get more complex which is fun.
Go Back To Programming & Development Topic List
Prev12
Add Reply New Topic New Poll