actually possible kaayo ni imo idea but i think you might hit some limitations.
1. First and foremost you need to remember that you can only bind your port once so it will be tricky to test your app.
2. Start your project on a smaller scale like you can use UDP and ping ONLY your local network. If it responds then include it on your user's list. Ping is quite fast and normally for intranet, you only need to do this for less than 500 computers so it will still be very fast. Just make sure you will put a time out on your ping. Your user's list will be detected incrementally or you can put a code where if you where able to ping a certain address do another call to grab his list and etc.
So as an example: you will try to set up your broadcast address at 10.0.0.1 at port 9999. When your app runs, it will do ping 10.0.0.1 to 10.0.0.255.
All those that will respond will be added to your user list including their ip address. When you send a message or even transfer a file, you can use the ip address to connect to that computer and do your normal client - server messaging / file transfer.
3. If you want to go to a higher level then just increase the number of ip address you will try to ping.
4. You might also need to implement a daemon that will try to continuously do the pings again every several seconds/minute to refresh your list.
With this, I think you should be able to create a serverless messenger.
It will be easier to do it with a server though.