Computer Science Canada Networking... What if i don't have two pcs? |
Author: | Decadence666 [ Sun Jun 24, 2007 9:54 pm ] |
Post subject: | Networking... What if i don't have two pcs? |
Is there some kind of setting, or hack that would allow me to run two instances of turing at the same time? Kind of hard to test networking stuff with only one computer... Thanks for any suggestions. [EDIT] I tryed compiling the program, and then running one instance of the example "chat" program, and then the other instance with the EXE.... That just realled fucked things up.... Don't try it ![]() |
Author: | Saad [ Sun Jun 24, 2007 10:04 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
I may be wrong but its impossible if you are running it from the compiler. But you can compile the exe and then run start the program twice that way you have two instances running. Thats the only way you can do it. |
Author: | Decadence666 [ Sun Jun 24, 2007 10:07 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Nope... Didn't work.... Same thing happened as when i ran it from the turing editor... Heres a screenie, i'm not gonna embed it in the page cuz my resolution is 1440x900, it will stretch the page... http://i17.tinypic.com/5253z8j.gif <--- result Maybe this is just the program's fault??? |
Author: | Saad [ Sun Jun 24, 2007 10:09 pm ] |
Post subject: | Re: Networking... What if i don't have two pcs? |
127.0.0.1 is your internal ip. You cannot network with this. Use you real ip To find your ip goto http://whatsmyip.org/ |
Author: | Decadence666 [ Sun Jun 24, 2007 10:11 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Well... If I'm running two instances on the same computer, wouldn't localhost make sense? My real ip didn't work. It said "could not connect". |
Author: | Decadence666 [ Sun Jun 24, 2007 10:15 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Do you have msn, it would make things alot faster. If you do add me up, brightwing[at]gmail[dot]com |
Author: | LaZ3R [ Sun Jun 24, 2007 10:32 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
firewall off? port blocking? Works fine when I test net programs on my own computer. I compile and run the compiled version along with the uncompiled version since it makes no diff when testing. |
Author: | Decadence666 [ Mon Jun 25, 2007 5:15 am ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Laz3r, are you using your external ip, localhost, or what? |
Author: | Decadence666 [ Mon Jun 25, 2007 5:34 am ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Ok, I even tryed it with a temporary second pc, on the network, i used the network address (192.169.0.100) and it sitll gave me the same crap... Maybe its the turing program itself? |
Author: | Decadence666 [ Mon Jun 25, 2007 5:43 am ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
I think that its the program thats going wrong... Because it connects fine... but then the way it outputs is totaly messed up. It sends data on every key press... Maybe its the program? |
Author: | Decadence666 [ Mon Jun 25, 2007 6:04 am ] | ||||
Post subject: | RE:Networking... What if i don\'t have two pcs? | ||||
Ok. I think I got it working..... I think it was just the turing example chat program sucking ass that was the problem... it even works fine on localhost! PROGRAM1
PROGRAM 2
ch is a string, i was just to llazy to change the variable name[/syntax] [EDIT] WOW.... sorry for the 4 posts in a row.... it was 5 in the morning.... |
Author: | Tony [ Mon Jun 25, 2007 8:48 am ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Actually that's what you were supposed to do - compile one or both of the programs, and run them through localhost. Don't forget to use different ports though. |
Author: | Decadence666 [ Mon Jun 25, 2007 12:32 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Wait, different ports.. so they aren't receiving the same message? Well, i'm starting a game where one player is the server, and the other is the client, so ports might not matter? well. ill see about that. |
Author: | Tony [ Mon Jun 25, 2007 12:55 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
If you are running both instances on the same computer, and they are both communicating through the same port - you will have problems. The example "works" because the server only reads and client only writes, so there is no interference. Think of a port like a dedicated communication channel between two instances. If I recall my multichat app from back in the day, the server would use as many ports as there were participants in the chatroom. |
Author: | Decadence666 [ Mon Jun 25, 2007 12:56 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Cool cool, they could be on the same port as long as they had different ip's right? |
Author: | Tony [ Mon Jun 25, 2007 1:21 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Yes. It's the combination of IP + port that designates a unique communication channel. |
Author: | Decadence666 [ Mon Jun 25, 2007 2:46 pm ] |
Post subject: | RE:Networking... What if i don\'t have two pcs? |
Okies thanks for the tips ![]() |