Win a copy of Head First Android this week in the Android forum!

Harshil Mavani

Greenhorn
+ Follow
since Jul 04, 2014
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
5
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Harshil Mavani

Thanks a lot Henry. It has helped me a lot.
It's a wrap folks
Wow. Amazing oberservation henry. Thanks a lot. Any tutorial you can suggest? I am really interested to dig more. And yes. My IP is 192.168.*.*
Please suggest some tutorial. Thanks again everyone.

Ulf Dittmer wrote:The key point is that port 6066 of the server must be reachable from the client - is that the case? telnet ip.address.of.server 6066 will tell you.



Exactly where the app fails. The server is reachable but to what extent, I don't know
When i used two laptops connected to the same Router, it worked. When a friend of mine (who is somewhere else.) tried connecting, it did not work. AND during that time, My server was running. But due to some other reason the client was unable to connect.
Thank you.
I am sorry. I am new to networking in Java. My aim was to create a chat app for personal use. Now i know there's facebook and other social networking sites which help you chat seamlessly, my intention was to gain a deeper understanding for the same with practical knowledge. And of course, Show off :P
Overall i wanted to make an app which is dynamic. and yes, both parties do have connection to the internet. One may be behind a router and other maybe on a modem. But, I'd like to start small where both have firewalls down and both on the same type of connection viz. Both behind different routers etc.
Thanks

Ulf Dittmer wrote:What problem are you facing doing that?


Currently i have only one issue. If i run the Client app on my friend's PC who is not present in my neighborhood, the client app throws and Exception viz. Could not connect exception. Is there another process or maybe some other way to connect two PC's on two different networks?
Hey Ulf,
I got the firewall problem. Thanks to your advice
Now one last doubt. This code works for 2 Laptops connected to same router. I want it to run on 2 PC's running somewhere else altogether. Any clue?
Thanks once again
Ulf, Thank you for your reply
I tried running it with the firewall ON. It doesn't work. Both the modules freeze and soon throw an Exception. Will adding an Exception rule in windows help?
If yes, Can you guide me with the same?

Thanks again
Hello, Everyone!
I am trying to create a console based chat app which to people can use over the net.. But first i want to test it if the concerned parties are on the same LAN.
Now my program works well on my PC Alone. viz. If I run both modules on my PC

The Client Code:


And The server code is :


The Program works like a dream on two different PC's on the same LAN
I wish to use it on two different PC's on different LAN Also it works only if Firewall is turned off on My PC ( Server PC ).

How do i scale it the Net?
And any suggestions regarding the Firewall Issue?

Thank you
just one question...is there anyway that i can have two synchronized blocks with different locks BUT can i have two separate threads working on each block? For Eg. After your reply i decided to do this
------------------------------------------------------------------------CODE----------------------------------------------------------


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
But just as you suggested... The Thread one is only doing all the work..the thread two has nothing to do.
i want it work in a way where, when thread one has a lock on the job_list_1, i want thread two to proceed with job_list_2 block...is that possible or am i big big noob :P
Really sorry if i am annoying.
Thank you


The initateBatch Method Spawns two Threads. And my doubt lies here. If i use Thread t1 = new Thread(new Runnabble(){ and over ride the run here, }) for both threads, i get my job completed in 4000 mill secs
If i use Thread t2 = new Thread(new Worker(){}) for both threads my job completes in 2000 millisecs with Exception thrown at times
I am new to the ranch.Thank you.