Page 1 of 1
Posted: Sat Apr 06, 2002 7:38 pm
by BackupUser
Restored from previous forum. Originally posted by merendo.
Hello guys and girls;
I have a problem and I´m hoping you can help me. How can I define f.e.
SendNetworkString(ClientID, String$)
that on the serverside I may send the string$ to all users. And on the Clientside, how to send the string$ to only one user???
Sorry for my bad english. Please correct me if something was wrong.
Thank you, merendo
We always need to hear both sides of the story (by Phil Collins)
Posted: Sun Apr 07, 2002 2:46 pm
by BackupUser
Restored from previous forum. Originally posted by tranquil.
You have to do it in a loop.
You must know which users are connected to you server. (Place these information in a liked list or an array) After that do a SendNetworkString to every ones who are connected to the server.
Doing network stuff is a little bit problematic in PB atm.
Anyway, I encountered some problems using the SendNetworkString and ReceiveNetworkString but I cound not figure it out. It has something to do with the statusbar text. I used the send_ API command instead to send Strings and Datas through the web.
To keep my User-List on the server side up to date I wrote a little procedure that Pings the client after a while of idle to see if the client is still available. Didnt the server got a respone in the next X Time, the user will be disconnected from the serverside and the UserSlot is beeing freed for other connections.
Hope that helpes. If you need help, you can write me a, of course german, mail to: [url]mailto:
tranquilizer@secretly.de[/url]
See you
Tranquilizer/ Secretly!
Registred PureBasic User
Posted: Sun Apr 07, 2002 2:46 pm
by BackupUser
Restored from previous forum. Originally posted by tranquil.
You have to do it in a loop.
You must know which users are connected to you server. (Place these information in a liked list or an array) After that do a SendNetworkString to every ones who are connected to the server.
Doing network stuff is a little bit problematic in PB atm.
Anyway, I encountered some problems using the SendNetworkString and ReceiveNetworkString but I cound not figure it out. It has something to do with the statusbar text. I used the send_ API command instead to send Strings and Datas through the web.
To keep my User-List on the server side up to date I wrote a little procedure that Pings the client after a while of idle to see if the client is still available. Didnt the server got a respone in the next X Time, the user will be disconnected from the serverside and the UserSlot is beeing freed for other connections.
Hope that helpes. If you need help, you can write me a, of course german, mail to: [url]mailto:
tranquilizer@secretly.de[/url]
See you
Tranquilizer/ Secretly!
Registred PureBasic User