Results 21 to 35 of 35
Thread: Game Host Scanner
- 10-01-2008, 01:12 PM #21
hmm...let me describe the whole process:
i (IP: 127.bla.bla.bla ) want to play a game of fifa...so i need to host and call some player to play against me. so
1. i open the software.
2. select fifa from the list.
3. click "launch and host"
4. the software start fifa and send a message on the port 1234
5. now i wait till one connect to me.
another player using the same software:
1. scanning for games..
2. scan all the IPs given in a text file in port 1234
3. found one game on IP: 127.bla.bla.bla
4. display all information about the found game in the JTable
5. continue scanning other IPs.
6. stop when all scan finished.
now if he wants to play fifa he just select fifa from the software and click "launch only"
rest in manual.
is it okay?
- 10-01-2008, 05:27 PM #22
In step 4:
send a message on the port 1234
Otherwise I guess it could work.
- 10-01-2008, 06:38 PM #23
yes...send means it makes the information available for all the clients to retrieve. it just opens a ServerSocket
now the problem is thread...where and how should i implement it?
- 10-01-2008, 08:21 PM #24
On the server, after the accept gets a connection, create a new thread and pass the socket to it and loop back to the accept.
On the searching client, I have no experience with opening multiple Sockets so can't advise. I' think you could have several threads trying to connect concurrently to various hosts, but have no idea how many. Parameterize the number of threads you start to try to connect and see what happens at various numbers of concurrent threads trying to connect. Try with 20 and 50 and 100 for example. Let us know the results. There will be a limit somewhere.
- 10-01-2008, 09:57 PM #25
i saw some serverless softwares that dont require any server to run...just all the clients communicate using a specific port (may be)...how that is done? datagram? can u give me some idea?
Last edited by GhosT; 10-01-2008 at 10:00 PM.
- 10-02-2008, 12:34 AM #26
Some protocols require one side to listen and the other to talk. I don't know what happens if both sides talk at the same time.
I other words, one side uses a ServerSocket to listen and the other a Socket.
I dont' know about using datagrams. What does the API doc say? Can both sides talk at the same time? Which one will hear the other first?
- 10-02-2008, 04:21 AM #27
lemme do some research...:D
- 10-02-2008, 06:11 AM #28
EID MUBARAK to u people!
- 10-02-2008, 06:45 PM #29
- 10-02-2008, 07:56 PM #30
Free to try; $2,300.00 to buy
- 10-02-2008, 08:27 PM #31
yeah...lolz...but its possible...haha...
Last edited by GhosT; 10-02-2008 at 08:47 PM.
- 10-06-2008, 12:09 AM #32
theres a problem...when i run this project through netbeans it runs fine but when i run it through jar it doesnt and doenst show any message/alert...
this is the message wehn i run it manually from cmd
- 10-06-2008, 12:55 AM #33
Your message doesn't show. Please post it again.
Show both the command you entered and the error message.
- 10-06-2008, 02:22 PM #34
i didnt know that java has a lot to do with *.dll files...i had some problem with some dlls and i pasted them inside the system 32 folder...and the problem seems to be solved....
i think jdic package has something to do with dlls.
another thing is whenever i run an application using exec() command sometimes the application terminates illegally...and show the dont send/send to microsoft message...any one know why??
- 10-06-2008, 07:30 PM #35
- By JFlash in forum New To JavaReplies: 2Last Post: 08-05-2010, 05:49 AM
- By Java Tip in forum java.netReplies: 0Last Post: 04-07-2008, 09:11 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 03-10-2008, 03:56 PM
- By Java Tip in forum Java TipReplies: 0Last Post: 02-15-2008, 09:41 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 11-19-2007, 05:34 PM