Java Local Network Chat [closed] - java

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I have spent much time researching how to create a chat system that would work between computers on the same local network, and so far have had no success (in Java). Could anyone provide me with references to things that actually work, or guide me?

Here are some useful resources that I found on Google.
http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
http://www.youtube.com/watch?v=eANjtQ6wJv0
http://www.youtube.com/watch?v=eANjtQ6wJv0
There are many more if you just ask "how to make a LAN chat program in Java" in your favorite search engine. There are tutorials online, but it is recommended that you are pretty competent in the language as well as networking. Go back to the basics and read a bunch of books on Java.
For future reference, don't ask questions like that on Stack Exchange. Put problems that you have about code. Be specific!

You have two problems. One is discovery, the other is connections.
For discovery on the local network you want mDNS aka Bonjour.
jMDNS offers a pure java Bonjour implementation.
You need to setup a service advertisement and a service discovery.
Once you discover a service you can then connect to the daemon you have setup on each machine.

Related

Socket streaming in java using eclipse for windows [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm working on a project to simulate skype app through lan which requires socket implementation if I'm to use java. There is no particular information available in the web on how to work on this subject. Any valuable tips are welcomed or suggestions are entertained.
Thanks in advance.
You've likely seen this, but Oracle provides some pretty in-depth documentation on sockets in Lesson: All About Sockets
In this series of lessons, you're shown how to read from and write to sockets in Java, thus sending data to and receiving data from the computer you're connected to. Perhaps you could start with something simple like sending audio files over LAN, then see if you can actively write audio to the socket which could then be read and played on the receiving machine.
EDIT: Good 'ol Bucky has a video on building an IM program using sockets in Java which should put you at a starting point for your mock-Skype application.
Best of luck!

it is nessesary to have a server in order to let the users interact in android application? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'am wondering if there is a way to make a peer-to-peer or phone to phone connection, lets say is a chat room or a game online, it is required to have a server that accepts socket connections or is there an easy way to do this? I'am talking about android phone-to-phone application via sockets, cause I don't know where can I get a free java server to make this possible
You could probably host a server instance on one of the phones, have that phone connect to itself, and have the other phone connect to the hosting phone. This way would also allow for multiple phones to connect to eachother.
Although I haven't done any android programming i've been playing a game that does this through either wifi, or bluetooth...
I can't help you with code or anything but here's a link to the designer's blog
http://www.sleepingbeastgames.com/blog/
I answered in an answer because I can't comment yet :(

Please suggest approach for Java-based web app [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm a Java developer that hasn't coded in about 5 years and wants to polish up my skills. I am going to create a small app that uses an OAuth 2.0 authentication flow and then makes a few REST calls and displays the results. I've got my credentials setup with the OAuth provider.
I used Eclipse back in the day, is that still a solid IDE for this type of project? If I want to share the app with others to show my work, where could I host the code?
Thanks for these and any other pointers.
first off - yes, Eclipse if still a good choice.
if you can, make you app a web-application, and then you can host it in PaaS such as Google AppEngine. then the app itself will be always accessible from any machine that is connected to the web. this way, you will be able to show it to anyone you want.
if you only want to show the code, then GitHub or Google Code are a good choices.
HTH

Peer-to-Peer connection over the internet [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
Is there any way to make a peer-to-peer connection over the internet without a server?
The idea is to send files from one PC to another PC.
In order to do P2P networking over the Internet, you have to deal with several issues. Mainly, NAT Traversal and Firewalls. If you do not deal with these problems, your connections will be error-prone. It is best to use an existing P2P framework for this purpose. In Java, one of the major frameworks is JXSE which is an open-source implementation of the JXTA protocols. The project is now discontinued but there is plenty of documentation available. See, https://jxse.kenai.com.
If JXSE is too heavyweight/complex for your purposes, which it can be, I would use a smaller/simpler P2P library that implements some basic form of NAT Traversal or firewall hole-punching. This may not account for every case, but it may be able to work for the particular case at hand. There are a few of these open-source implementations available; Google it or look on GitHub.
Write an application (server) that opens a socket to listen on some arbitrary port. Write another application (client) that sends a request to the IP address and port of the host running the server.

simple Java api to form and send ntp packet [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
We should feed some system under test with ntp data, that we should control. Since the testing environment is mainly java-oriented, it would be perfect to find and reuse any java code, that forms and send ntp packets. There is no matter, how precise this server side would be, since the main idea of the test to provide the mocked time through via ntp packets. Is there any ntp java library, or may be example, especially for netty usage?
I would appreciate for any suggestions. Thanks in advance!
UPD. Since the question is taken to 'on hold' (I don't understand why, ntp + java seems to be too familiar to local folks, but not to me), I'd like to summarize it to simple question:
Is there Java API that can provide ntp server packets on ntp client dmand being simple like NTPPacket ntpp=new NTPPacket(new Time()); while all other wirings will be default?
Ho-ho, I see some haters already started their downvotes; it seems they just see the title, but not the details of the issues (I really dislike this kind of haters)
I have even to remove 'java' tag here. So, my suggestion that I can reuse http://mvnrepository.com/artifact/org.apache.directory.server/apacheds-protocol-ntp/2.0.0-M15 for this purpose

Categories