Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DLL Talk / a little Darknet Understanding Help

Author
Message
Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 23rd Dec 2009 15:58 Edited at: 23rd Dec 2009 16:00
I have searched around for answers and as far as I can tell, I am doing nothing wrong. The problem I am having appears to be on the server side. The server reports that it has been configured successfully and apparently correctly. The client reports its connection as correct. The server for a second reports that the Client has joined and then reports that it has not... however the client reports that it is still connected... here's the code for both... you need BlueGUI and Matrix1 plugins for the server and Client

Client:


Server:


I've tried to figure it out for myself now for nearly 12 hours. I can't see what is wrong with it. Any help if great!

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Michael P
13
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 24th Dec 2009 00:48
I think you missunderstand mnClientJoined.

mnClientJoined reports clients that have recently connected but reports them only once. You should use mnClientConnected to determine if that client is connected thereafter or if you just want to be notified of clients who have recently disconnected you can use mnClientLeft which operates in a similar way to mnClientJoined.

If 2 clients join an empty server and mnClientJoined is called 3 times it will return the following:
- 1
- 2
- 0 (repeatedly until another client joins)

Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 24th Dec 2009 01:09
So then, looking at the FOR loop, how would I detect the total of clients currently connected... since c.connected only grabs one id... I can't establish the FOR loop without a total

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Michael P
13
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 24th Dec 2009 01:58
This code will tell you the total number of connected clients:


Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 24th Dec 2009 02:06
THANK YOU! I get it now. I feel so silly

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 24th Dec 2009 02:32 Edited at: 24th Dec 2009 05:40
Should I be right in saying that the total variable above will only continue to grow... I'll find out for myself, I imagine that I would use mn user disconnected (or something to that effect) to do the opposite of the code above.

Edit:
When altering the server's code to work with what you posted (adapted for myself) Now the client doesn't connect, but on the server side the text flashes at the same time the client's time out interval is set for.

Edit 2:
Did I mention I am running the server and client on the same machine? - is that going to cause problems?

The connection from client to server times out, even though the server configures correctly (according to the error report back) but the client side times out. With the time out interval for the client, the server's display of text flashes at exactly the interval of the timeout. I have tested this from 1 second to 15 seconds and have come to that conclusion.

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Michael P
13
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 24th Dec 2009 10:50
Clients won't be able to connect unless mnClientJoined is called several times before the client times out, so you must make sure that mnClientJoined is called regularly on the server side.

If there are 4 clients connected the total variable will be 4. If 2 clients leave the total variable will then be 2 because mnClientConnected will return 0 for those clients that have disconnected or were never connected. The total variable will only continue to grow if no clients disconnect and more connect.

Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 24th Dec 2009 15:14
Right, I gather the information about the MN Client Joined's variable statements but I have the command in a loop, so it's being called indefinitely. I still don't quite understand. If it makes a difference, I am blond

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Michael P
13
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 24th Dec 2009 15:38
I don't really understand what you are doing, can you show me some code please?

So long as mnClientJoined is called regularly clients should be able to connect.

Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 24th Dec 2009 16:27
In the two code segments above, add the bit you corrected, make sure that MN Client Joined is in the main loop somewhere, I have tried bo9th in the for loop and main 'do' loop. Either report the server being connected to by a client once and then report no connection from the client... but the client side stays connected. I need to report a constant connection from the server by a client (IE see all current connections server side)

Code:




First is client, second is then server
Take a look. You need BlueGUI and Matrix1 Utility Plugin (IanM) for it to work, otherwise I will have to rewrite it all for you, which may not cause the same errors.

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 27th Dec 2009 07:13
Obviously you don't have these plugins , anyone else?

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 28th Dec 2009 05:41
EDIT-
I found the problem... maybe this will give rise to the need of an additional command-

Because the method for retrieving connected clients must be done in a for loop, the text string for reporting connected users must be in that loop. If it isn't contained in the loop, whatever the maximum number of clients is - if that last client isn't connected, the text will report that no users are connected. When contained in the loop, it will report which client(s) out of the maximum are connected... however, shouldn't there be a command to return the total number of clients connected (number of connections, not by client ID) thus resulting in a more concrete way of determining current server occupancy? Seems that a larger for loop may take up more time... just a thought

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Michael P
13
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 29th Dec 2009 18:55
There is no need for a command to do that because you can do it already using the code I posted earlier (adapted to make a function):


You can also do this, which will perform much better: increase total every time a new client joins (shown by mnClientJoined) and decrease it every time a client leaves (shown by mnClientLeft):


Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 30th Dec 2009 03:49 Edited at: 30th Dec 2009 03:50
Yes, and I've made the command work, but I was simply saying that there should be (in my opinion) a new command because:



If you wanted to display the current client(s) connected to say, an admin application for spam reporting/blocking, User to Admin/ Admin to user (Help Messages) messaging, only the active (A) Client will be sent to the screen as a string and reported to the viewer (because in order to send the connections to the screen, you must add the String Commands into the "For - Next" loop. Because doing this will only display one client per loop, there should be a command to call all current connections - most likely by the number of active connected IP addresses.

I am happy working around this, but it's just one of those areas of trouble, and if deemed in need of a new command, thank you. If not, I still love DarkNet

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.
Michael P
13
Years of Service
User Offline
Joined: 6th Mar 2006
Location: London (UK)
Posted: 30th Dec 2009 12:11
Not sure if I understand what you want in this new command. You want a fast way of calculating the number of clients connected?

So if 5 clients are connected, ClientsConnected returns 5 as an integer.

Sorry if I misunderstand

Daryn Alsup
11
Years of Service
User Offline
Joined: 5th Jul 2008
Location: In your head... dun dun DUN!!!!!!!!
Posted: 1st Jan 2010 00:45
Think of it this way...
you need a loop to return client information, but if you want to print this information to the screen, you cannot print all the clients connected at once, you can only print a changing string:

For blah = blah to blah2

client joined and connected code...

print code...

next blah

this means that for each loop, a new client will be printed to the screen, but if I wanted to print all of the clients to the screen... there is no way to do that... so say if I wanted to create an application for moderators of an online game, there would be no way to store the currently connected clients for moderators to 'watch.' If you could gain the number of connections and client ids in total then this would be simpler. Maybe an array type - storing the ID and IP address that could be generated and updated as clients connect and disconnect.

Other than that, I love this plugin - the best one I have.

Jack and Jill went up a hill to fetch a pale of water... but Jill got tired of his s#%& so she shot him.

Login to post a reply

Server time is: 2019-10-16 23:07:35
Your offset time is: 2019-10-16 23:07:35