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

[EXTENSION] Socket (3.0.1)


Post New Thread Reply   
 
Thread Tools Display Modes
psychonic

BAFFLED
Join Date: May 2008
Old 03-02-2010 , 10:59   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #251

Have a new crash that might be related to the Socket extension (winsock is on the stack).

This is with Socket 3.0.1.
Attached Files
File Type: mdmp Steam__570557__2010_3_1T20_44_53C111835468.mdmp (142.7 KB, 318 views)
psychonic is offline
Munra
Senior Member
Join Date: May 2004
Old 03-15-2010 , 10:25   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #252

Yes I was also having a crashing issue. I also tried disabling all "non standard plugins" didnt help but once I removed the sockets extension servers seem much more stable now.

Win 2003
TF2
__________________
http://anbservers.net
My Plugins
PMs for support will be ignored please use the plugin topic for support.
Munra is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 03-15-2010 , 11:03   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #253

Do you have any mdmps?
sfPlayer is offline
citkabuto
Junior Member
Join Date: Dec 2009
Old 03-24-2010 , 08:42   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #254

Hi,

I've been using sockets extension for TCP without issue, but I now need to use it with UDP and am hitting a problem.

Here is some example code (there's not really any outgoing UDP examples anywhere, so I've had to guess at what to do):

Code:
#include <sourcemod>
#include <socket>

new Handle:rsSocket = INVALID_HANDLE

public Plugin:myinfo = {
        name = "socket test",
        author = "citkabuto",
        description = "Simple socket test",
        version = "1.0.0",
        url = ""
};

public OnPluginStart() {
        RegConsoleCmd("say", Command_Say)

        rsSocket = SocketCreate(SOCKET_UDP, OnSocketError);
        SocketSetOption(rsSocket, SocketReuseAddr, 1);
}

public Action:Command_Say(client, args)
{
        LogChat(client, args)
        return Plugin_Continue
}

public LogChat(client, args)
{
        new String:msg[2048]
        new String:text[1024]

        new String:hostname[40]
        new port = 6666

        Format(hostname, sizeof(hostname), "xxx.xxx.xxx.xxx")

        GetCmdArgString(text, sizeof(text))
        StripQuotes(text)

        Format(msg, sizeof(msg), "[TESTMSG]:%N:%s", client, text )

        SocketSendTo(rsSocket, msg, sizeof(msg), hostname, port);

}

public OnSocketError(Handle:socket, const errorType, const errorNum, any:hFile) {
        // a socket error occured

        LogError("socket error %d (errno %d)", errorType, errorNum);
        //CloseHandle(socket);
}
Each time this fires, I get the following error message:

Code:
L 03/24/2010 - 13:14:26: [socktest.smx] socket error 4 (errno 9)
I have a process listening for any packets on the target machine (which has been tested and is working as expected).

Any ideas what I'm doing wrong?

Last edited by citkabuto; 03-24-2010 at 09:22.
citkabuto is offline
Munra
Senior Member
Join Date: May 2004
Old 03-24-2010 , 08:52   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #255

Quote:
Originally Posted by sfPlayer View Post
Do you have any mdmps?
Forget I said anything I removed some other plugins as well. I dont think it was the ext crashing it.
__________________
http://anbservers.net
My Plugins
PMs for support will be ignored please use the plugin topic for support.
Munra is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 03-24-2010 , 16:17   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #256

Quote:
Originally Posted by citkabuto View Post
...
Code:
L 03/24/2010 - 13:14:26: [socktest.smx] socket error 4 (errno 9)
...
I could reproduce and (hopefully) fix the issue, please test the attached build.

Last edited by psychonic; 03-05-2011 at 23:26. Reason: removed attachment due to no source code being available
sfPlayer is offline
citkabuto
Junior Member
Join Date: Dec 2009
Old 03-26-2010 , 03:58   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #257

Excellent work! That fixed it

Thanks!!
citkabuto is offline
Wolve-Hunter
Junior Member
Join Date: Mar 2010
Old 03-26-2010 , 12:57   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #258

I copied the extension to my extension folder but it doesn't load, i dont know why. After copying, i restarted server but nothing happens. i want to use Kigen's antihack tool and this is my alert:

[SM] Plugin kigen-ac-pub.smx failed to load: Required extension "Socket" file("socket.ext") not running.

someone can help me?
Wolve-Hunter is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 03-26-2010 , 13:00   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #259

Quote:
Originally Posted by Wolve-Hunter View Post
I copied the extension to my extension folder but it doesn't load, i dont know why. After copying, i restarted server but nothing happens. i want to use Kigen's antihack tool and this is my alert:

[SM] Plugin kigen-ac-pub.smx failed to load: Required extension "Socket" file("socket.ext") not running.

someone can help me?
You didn't install sockets correctly. Grab 3.0.1 from the bottom of the first post and copy it over the addons/ folder on your server.
pheadxdll is offline
sfPlayer
Senior Member
Join Date: Dec 2007
Location: Germany
Old 03-26-2010 , 13:36   Re: [EXTENSION] Socket (3.0.1)
Reply With Quote #260

There should be a socket-extension related error message a few lines above in the logs.

sm exts list should also display the error msg.
sfPlayer is offline
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:28.


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