Computer Science Canada Urgent - Net Help - Multiple connections. |
Author: | ashtray13 [ Sun Jan 19, 2003 11:42 am ] |
Post subject: | Urgent - Net Help - Multiple connections. |
Anyone know how to make Turing connect to more then one other computer? I wanna make a 5 way chat, i have the idea but it won't connect to anything over 1 computer . |
Author: | Tony [ Sun Jan 19, 2003 11:49 am ] | ||
Post subject: | |||
to connect to more then 1 computer you need more then 1 StreamNum variables. so
|
Author: | ashtray13 [ Sun Jan 19, 2003 4:37 pm ] |
Post subject: | |
I accually wanted 5 computers to connect to one place, not 1 to connect to 5 places, is ti possible cause the arrays isn't working, after one time of connecting it just skips. |
Author: | Tony [ Sun Jan 19, 2003 10:44 pm ] | ||
Post subject: | |||
in that case you use an array with Net.WaitForConnection (or something like that)
I think this would work... Though its a better idea to put that into a process so that program can run even if not all 5 clients are connected. Oh, here's your problem (I think), clients must connect on different ports |
Author: | Penguin [ Mon May 26, 2003 1:50 pm ] |
Post subject: | |
ok, so this would allow all the users that connected to one place to be able to see what each other says to one another? I'm working on a chat program in turing for my summative project. I wanted to have almost like an instat message thing with GUI. Is it possible to have that, or would the "chat room" idea be better? Almost like irc. |
Author: | Tony [ Mon May 26, 2003 2:15 pm ] |
Post subject: | |
instant messaging and chatrooms are practically the same... the only difference is that instant messaging is always talking in private only, while chat is when message is send to all users connected. they would be structured the same if you plant on sending messages through the server. |
Author: | Penguin [ Mon May 26, 2003 2:30 pm ] |
Post subject: | |
I see, how would I structure it so that my procedures to start a server and allow multiple connections, aswell be able to connect to a server that has multiple users connected which most likely needs to connect to each user on a different port. procedure waitconnect put "\N" put "Your IP Address: ", Net.LocalAddress, " ", "Hostname:", Net.LocalName, "\N" put "Waiting for other user to connect..." .. connection := Net.WaitForConnection (PORT, address) % Wait for a user to connect end waitconnect %Delares connect procedure procedure connect put "\N" put "Connect to (IP/Hostname:" .. get address connection := Net.OpenConnection (address, PORT) % Connect to the IP inputted end connect |
Author: | Tony [ Mon May 26, 2003 3:25 pm ] |
Post subject: | |
well the server will constantly be listening for a new connection and any incomming messages (all incomming messages are for the server). if a new connection in made, it is added to an array (you need to figure out a way to disconnect too, so array doesnt overflow). when a message arrives, it is fawarded to everybody in the array. |
Author: | Homer_simpson [ Mon May 26, 2003 3:43 pm ] |
Post subject: | |
netwaitconnection command.... i hate that command coz when yer waiting for a connection it doesn't let u do anything else it's like the program freezez untill a connection is made... =(... any idea how to fix that? |
Author: | hez [ Mon May 26, 2003 3:49 pm ] | ||
Post subject: | :D | ||
5-way chat impossible I am speaking form experience cause i made a 2-way chat prog and only worked with 2 way. Me and a freind the smartest person in turing (he made an whole os inside win98) worked togther to make it but it is impossible with turing functionality toom any problems and network latency is the thing here is my rough chat code i ripped out of my project ALTER then use it freely if ya want... it has: -NICK SUPPORT(WHOO!) -2-WAY CHAT -INCOMING SOUNDS -"QUIT" command -CLIENT/HOST COLOR TRY IT OUT there is still some stuff taht shoudn't be inthere like the config.ini stuff delete it (TEST it out by conenctiong to yuorself (127.0.0.1))
|
Author: | Tony [ Mon May 26, 2003 6:10 pm ] |
Post subject: | |
you cant program an OS in turing... OS interacts between your programs and hardware... what he could have done is made a SHELL based on window's APIs that windows itself is still running |
Author: | Penguin [ Mon May 26, 2003 6:47 pm ] |
Post subject: | |
lol... hmmmm.... but is it possible. I see there is much argument about that. Has anyone been successful in creating a turing application that can chat to more than one other person at once. |
Author: | Tony [ Mon May 26, 2003 6:56 pm ] |
Post subject: | |
yeah, I had a 3 way chat going back in the day... 1 server, 2 clients... worked well... |
Author: | lil_li [ Mon May 26, 2003 6:59 pm ] |
Post subject: | |
can turing really handle all 5 networks at same time?.... i thought turing is too slow |
Author: | Penguin [ Mon May 26, 2003 7:13 pm ] |
Post subject: | |
could the 2 clients see what you were typing both at once. How did it work? |
Author: | Penguin [ Mon May 26, 2003 11:42 pm ] |
Post subject: | |
sorry to spam, but one more thing. Do you still remember the structure of the source you had when you connected to 3 people at once. I'm interested in making a mirc style chat. anyone else have any suggestions? |
Author: | Penguin [ Tue May 27, 2003 7:23 pm ] |
Post subject: | |
doesn't anyone have any suggestions of previous experience with making a more than 2 way chat program???? |
Author: | Blade [ Tue May 27, 2003 7:56 pm ] |
Post subject: | |
i think they've already told you to use more than one connection. one person hosts and as the other two chat the host sends the messages back and forth |
Author: | Penguin [ Tue May 27, 2003 8:01 pm ] |
Post subject: | |
k, ye, i was just curious to know the exact structure tony used. |
Author: | void [ Tue May 27, 2003 8:13 pm ] |
Post subject: | |
chat is possible with turing in as many clients as you want the only problem is the lag and the fact that too many users will crash your program...i remember that i made mine with a flexible array, every time a client attempted to connect to my server, it stored him as a single variable, increased the max value of the array, and stored him as the last variable in that array and dumped the value in the single variable, this way its like an ID check at a club 1.you enter 2.you connect 3.you wait to allowed entrance while you are being initialized as a client 4.you are connected once part of the array the only problem is when we reached past 4, we started spamming like mad and the server shut down and we all got 5 day in school suspension...lolz.... ...to bad...it stunted our intelectual growth (yea rite) |
Author: | Tony [ Tue May 27, 2003 8:34 pm ] |
Post subject: | |
LOL, they suspended you for chatting in turing?! man, thats nuts... especially for 5 days lol, I remember that net send got out of control on our school's network... it was removed from the start bar, but you can still access it by creating a shortcut (if you know what to type) or using a programming language (in our cares VB...)... me and my friend got quite annoyed so we also programmed our nukes... usually a small program to send out 10,000 messages... that kind of hangs the other computer... well untill user is done clicking |
Author: | void [ Tue May 27, 2003 8:54 pm ] |
Post subject: | |
lolz....yea...we got suspended this year too...from our accounts for using telnet by creating a shortcut to it |
Author: | Martin [ Tue May 27, 2003 9:21 pm ] |
Post subject: | |
Hmm, I'm pretty sure that you can't get multiple connections in turing. Tony and I played around with it a bunch last summer, but couldn't get it to work. |
Author: | Tony [ Tue May 27, 2003 9:41 pm ] |
Post subject: | |
I though we were trying to make a over the network game, but we couldnt get it to real time.. lag was horrible... but multiple connections are possible |
Author: | Penguin [ Thu May 29, 2003 2:19 pm ] |
Post subject: | |
Thanks for all the help, but I've convinced a friend of mine to help me construct a server program so that the clients can connect to it. He has done it a few times before, anyone in toronto who has participated in math competitions may know him. Anyways, he loves turing and I'll post the source for the server when its complete. |
Author: | Tony [ Thu May 29, 2003 4:59 pm ] |
Post subject: | |
Why does it matter if we live in Toronto or not? I though math contests (waterloo once) are national I'm from Toronto 8) |
Author: | Delta [ Wed Dec 10, 2003 11:09 pm ] |
Post subject: | OK.....my thoughts.... |
I have began production on a multiple connection chat room.... these connections are made as followed...... Anyone can create their own server ... and anyone can connect to it (if IP or computer name is known)....there will be nick support and also private messaging to anyone in the chatroom also a buddylist....also, this is a maybe...if I get it working properly, sending files....prolly only textfiles and pictures....not sure if exe's will work.... but testing is in progress.....I will post up the program as I feel neccessary to do so..... wish me luck..... -Delta -Feel free to add me to your MSN list (ssdelta_@hotmail.com) -Comments and suggestions always welcome |
Author: | DanShadow [ Thu Dec 11, 2003 5:22 pm ] |
Post subject: | |
I have never been able to get a server to connect to more th an 1 client, or anything close to that. But seriously, if anyone can get this to work, please pm me! I have an idea: Keep 1 server open all the time, connects to multiple clients. When a client sends info to the server, the server will sort it out, and return info accordingly. Ex. Client sends variable 'input' to server input:="stat list" server>>> if input="stat list" then get net %something% .... Well sorry...thats too confusing. I mean to make a MUDD in Turing using 1 server and multiple clients, practically to create a multiplayer game...heh |
Author: | Canadian Rob [ Wed May 19, 2004 4:45 pm ] |
Post subject: | |
lol, I guess im lucky then lol my teacher he does not "WANT" To know the admin passowords because he says it creates him a "new Job" lol well yea.. I have the admin passwords for Win Select and sum other ones.. and yea.. Not once in trouble.. I Even TRIED To get in trouble once I typed it in RIGHT In front of him and he was like What are you doing? Im like geting the start bar, he goes oh? k.. and just walks off lol Ither he doesnt care or has NOOOOOOOOO Clue lol |