AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   [Solved] sockets_hz (https://forums.alliedmods.net/showthread.php?t=184422)

ProIcons 05-05-2012 07:16

[Solved] sockets_hz
 
PHP Code:

public ga_read() {
    for (new 
i=1;i<=g_ga_counter;i++) {
        if (
g_ga_sockexists[i]) {
            if (
socket_change(g_ga_accept[i],1))
            {
                
socket_recv(g_ga_accept[i],g_ga_data,1024)
                if (
equal(g_ga_data,"")) {
                    
server_print("[Network][Listen] Connection with Client Lost.");
                    
socket_close(g_ga_accept[i]);
                }
                if(
strlen(g_ga_data) > 0
                {
                    
server_print("[Network][Listen][Data] [<-] %s",g_ga_data);
                }
            }
        }
    }


This isn't working, any idea?

The only message i'm seeing, is


[Network][Listen] Listening On Port 81

No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection
No pending connection

I'm opening a connection
sending data but still this..

claudiuhks 05-05-2012 07:21

Re: sockets_hz
 
The minimum interval between tasks is 0.1!

amxmodx.cpp
PHP Code:

if (base 0.1f)
    
base 0.1f


ProIcons 05-05-2012 07:34

Re: sockets_hz
 
This is working for the other socket i have, the non-listening

ProIcons 05-05-2012 09:48

Re: sockets_hz
 
I changed it to 0.1, and still same thing... no pending connection..


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

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