[EXTENSION] Socket (3.0.1)
1 Attachment(s)
latest version: http://forums.alliedmods.net/attachm...chmentid=83286
This extension provides networking functionality for SourceMod scripts. It's a heavily modified fork of Olly's sockets extension 2.0.0. It's supposed to be stable. If it crashes please post the srcds debug.log and the plugin's sourcecode which makes use of the socket extension. You need at least SourceMod 1.0.3! Look at socket.inc for development documentation. Developer Notes
Usage example The example example.sp downloads a file via http to <modfolder>/dl.htm The example listenexample.sp provides a simple echo server. Use telnet <serverip> 50000 to connect to it. The examples are located at addons/sourcemod/scripting in the socket.zip file. Changelog Version 2.4.0+
Sourcecode repository http://player.to/gitweb/index.cgi?p=sm-ext-socket.git - Clone my public repository: git clone git://player.to/sm-ext-socket.git <directory> Download latest version: http://forums.alliedmods.net/attachm...chmentid=83286 |
Re: [EXTENSION] Socket
So this is compatible with Olly's new IRCRelay v2.0.0 running on Linux?
|
Re: [EXTENSION] Socket
No, but I've modified it to be compatible.
IRCRelay somehow doesn't work, the initial IRC communication works (nickname, ping-pong, etc.) and it receives everything from the socket but doesn't respond back/react on commands. My debugging shows that it doesn't even call SocketSend() after it receives PRIVMSG, so it's a bug/configuration issue in the plugin and not in the extension. |
Re: [EXTENSION] Socket
Simply awesome. I'm running my cupbot with the extension :wink:.
A few questions tho: 1) In the include file, the native SetSocketArg takes any:arg but the forwards output it as Handle:arg ... why? 2) Does it support sending and receiving the \x00 char? Good work. :up: |
Re: [EXTENSION] Socket
Quote:
All data being sent to the socket in ircrelay is queued, so that relays dont flood off the server. Also this wont work with a local database, because you removed all of the md5 stuff from the extension. What happened to BindSocket ? |
Re: [EXTENSION] Socket
@p3tsin
1) I forgot to update these, output will also be any:arg soon 2) currently not, but i'll look into it @olly You are calling send with a closed socket, that can't work as expected (this only seems to happen on startup if somebody didn't set the irc_server cvar before, the irc-relay config seems to require manual execution through the server.cfg). I added additional checking to SocketSend if the socket is closed and it correctly throws an error. The md5 stuff should go into another extension, it makes no sense to put it in here. You can also store the passwords unhased like you do for SQLite. BindSocket will be back soon, including some more natives to create server applications on gameservers ;) |
Re: [EXTENSION] Socket
Version 2 is out :)
|
Re: [EXTENSION] Socket
Wow, a stable socket-ext for win&lin, finally :D
great job btw |
Re: [EXTENSION] Socket (2.1.0)
I am going to stop my socket plugin, as yours has more features, more stable, etc....
So im converting IRC Relay to your ext, but it never gets past sending PONG :.....\n\r\n\r I have checked if the socket is connected, etc, and it seems to be, but it seems your extension is not sending the packet. I have debugged my plugin as far as i can, and I see no problem with sending the 'pong' packet. |
Re: [EXTENSION] Socket (2.1.0)
My extention is actually only an enhanced version of yours ;)
Please add debug output right before you call SocketSend() and use wireshark (or any other packet sniffer) to check if you actually call SocketSend() and the ext sends the packet. If neither the error callback gets fired nor a native error gets triggered it's a bug, please send me the sourcecode for further investigation. |
All times are GMT -4. The time now is 08:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.