Raised This Month: $51 Target: $400
 12% 

[NATIVE] Server Queries


Post New Thread Reply   
 
Thread Tools Display Modes
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 12-22-2012 , 19:28   Re: [NATIVE] Server Queries
Reply With Quote #31

Quote:
Originally Posted by Black4Dragon View Post
I have a little problem...

If the server is online everything is ok but when I make the plugin check a server that is offline there's a lag until the plugin finishes the search, probably because the plugin waits too much time for the response.

What can I do in order to make the waiting time to be shorter (like 0.5 sec or even lower)?

I tried to use the timeout param but no luck... The plugin makes lag when verifying an offline server.

Thank you!
Because this api uses tcp protocol, you should use udp protocol.
__________________

Last edited by Neeeeeeeeeel.-; 12-22-2012 at 19:28.
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Black4Dragon
Junior Member
Join Date: Nov 2011
Old 12-23-2012 , 02:56   Re: [NATIVE] Server Queries
Reply With Quote #32

Thank you for the response, but why do you say that?
I checked server_query_api and it uses SOCKET_UDP not TCP.

Line 242 server_query_api.sma:
PHP Code:
new hSocket g_eQueryDataiIndex ][ QD_hSocket ] = socket_openg_eQueryDataiIndex ][ QD_szIP ], g_eQueryDataiIndex ][ QD_iPort ], SOCKET_UDPiError ); 
And in the .inc file there's nothing to do with UDP or TCP so I don't think this is the problem.

If you have another idea please post it as soon as possible.

Thank you!

EDIT: I fixed the problem with a simple delay of 0.2 sec + 0.1 sec at every set_task and it did the job!

Last edited by Black4Dragon; 12-23-2012 at 04:33.
Black4Dragon is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 12-23-2012 , 13:57   Re: [NATIVE] Server Queries
Reply With Quote #33

I said that because some time ago I try to do somethink with sockets and I used tcp protocol, when I tried to connect (ingame) and the server app was off, the server get freezed... I fixed using udp protocol.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
Old 02-21-2015, 10:35
xkp
This message has been deleted by xkp. Reason: some old post that need to be deleted please, nothing major.
xkp
Member
Join Date: Jan 2015
Location: AlliedLand
Old 03-09-2015 , 13:15   Re: [NATIVE] Server Queries
Reply With Quote #34

Can you add menu to the interface like the older version, It will be awesome i have try but it's kinda hardwork
__________________
xkp is offline
Send a message via Skype™ to xkp
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 09:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode