[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. |
Re: [EXTENSION] Socket (2.2.0)
I'll be really happy if I were able to IRCrelay on my Linux TF2 server.
I hope you get it sussed between you :) |
Re: [EXTENSION] Socket (2.2.0)
The bug is already fixed and it seems to work so far, expect him to release soon :D
|
Re: [EXTENSION] Socket (2.2.0)
Ehm, where do I put the files from the socket_src.zip file?
|
Re: [EXTENSION] Socket (2.2.0)
socket_src is the sourcecode archive, you only need socket.zip (windows&linux, ep1&ep2)
|
Re: [EXTENSION] Socket (2.3.0)
Nice job fixing the receiving of binary data and other improvements :wink:
Im having some problems when it comes to connecting to hosts that refuse the connection tho; it causes a send or a recv error making the extension choke and unable to receive or send data at all. Even reloading the extension doesnt seem to help, and I have to restart the whole gameserver. Also, when the host doesnt exist the extension keeps trying to connect to it for a few minutes before timing out, that might be a bit too long. |
Re: [EXTENSION] Socket (2.3.0)
SocketSetOption(socket, SocketSendTimeout, 10000); should set the timeout for connecting to 10 seconds.
A socket error should not affect other sockets, but due to a special optimization a bug can cause all sockets to malfunction. Please tell me the values of errorType and errorNum in your SocketError callback, I'll look into it. |
Re: [EXTENSION] Socket (2.3.0)
Here we go:
Code:
errorType 4 (Send error), errorNum 111 |
Re: [EXTENSION] Socket (2.3.0)
I think I found the bug, please test if the attached version works.
|
Re: [EXTENSION] Socket (2.3.0)
Awesome, that did the job. :up:
|
Re: [EXTENSION] Socket (2.3.0)
would this version stop sourcebans (which requires v2.0) or no?
|
Re: [EXTENSION] Socket (2.3.0)
Sourcebans doesn't require a socket extension.
|
Re: [EXTENSION] Socket (2.3.0)
Quote:
|
Re: [EXTENSION] Socket (2.3.0)
I'll update later, can't compile on Windows atm
|
Re: [EXTENSION] Socket (2.3.0)
Did you make any progress on a new build? If not, is it safe to use your previously attached version?
|
Re: [EXTENSION] Socket (2.3.0)
It's safe as long as you don't try connecting to unreachable hosts. I'll post a small update in a few hours and a rather large one later which implements SendTo for UDP.
|
Re: [EXTENSION] Socket (2.3.1)
Socket 2.3.1 seems to require glibc 2.4, so it refuses to load on my Debian Etch Linux server with glibc 2.3.6:
Quote:
|
Re: [EXTENSION] Socket (2.3.1)
Thanks, recompiled it without stack protector. It should work with GLIBC >= 2.1.3 now.
|
Re: [EXTENSION] Socket (2.3.1)
Compiled it with gcc-4.1 (edited the Makefile) upon glibc 2.3.6. Worked as well. Thanks!
|
Re: [EXTENSION] Socket (2.3.1)
Hello,
I am getting the following errors when I try to use this on my DODS servers along with Olly's IRC Relay. Olly suggestion I post this error here. However, Im trying to get it to work on my dods servers, and I get the following errors. L 05/23/2008 - 19:30:54: [irc-relay-core.smx] socket error 5 (errno 10022) L 05/23/2008 - 19:30:54: [SM] Native "SocketIsConnected" reported: Invalid handle: 16777467 L 05/23/2008 - 19:30:54: [SM] Debug mode is not enabled for "irc-relay-core.smx"However, Im trying to get it to work on my dods servers, and I get the following errors. L 05/23/2008 - 19:30:54: [irc-relay-core.smx] socket error 5 (errno 10022) L 05/23/2008 - 19:30:54: [SM] Native "SocketIsConnected" reported: Invalid handle: 16777467 L 05/23/2008 - 19:30:54: [SM] Debug mode is not enabled for "irc-relay-core.smx" L 05/24/2008 - 09:24:25: [irc-relay-core.smx] socket error 5 (errno 10022) L 05/24/2008 - 09:24:25: [irc-relay-core.smx] socket error 3 (errno 10038) L 05/24/2008 - 09:24:25: [SM] Native "CloseHandle" reported: Handle 10000fb is invalid (error 1) L 05/24/2008 - 09:24:25: [SM] Displaying call stack trace for plugin "irc-relay-core.smx": L 05/24/2008 - 09:24:25: [SM] [0] Line 1231, irc-relay-core.sp::OnSocketError() Cheers, Disconnect |
Re: [EXTENSION] Socket (2.3.1)
I just wanted to note, I set up a fresh DODS server today. Installed metamod, soucemod, irc relay, and this socket extension... nothing else. I still get the same issues. :(
|
Re: [EXTENSION] Socket (2.3.1)
Hi,
This looks like a really interesting extension with a great potential... Do you have more doc/samples ? I would like to create a plugin that uses this lib, but I have some questions... - How can I do to have a request/reply mechanism for a plugin ? Like if a player say "meteo" and then the plugin connects to a meteoserver, and reply back to player ? - Can you add native text functions to make communication easier, like Readline read buffer until found a LF char). So communication with a telnet server would become really easy, and someone could develop a webserver ;) Thanks |
Re: [EXTENSION] Socket (2.3.1)
in thread IRC Relay v2.0.1
Quote:
Quote:
Quote:
Quote:
|
Re: [EXTENSION] Socket (2.3.1)
gM@X, what game are you getting these errors on?
|
Re: [EXTENSION] Socket (2.3.1)
Counter-Strike: Source
|
Re: [EXTENSION] Socket (2.3.1)
Looks like the developer isnt around :(
|
Re: [EXTENSION] Socket (2.3.1)
he was busy the past few weeks, i'll look into it.
|
Re: [EXTENSION] Socket (2.3.1)
Quote:
|
Re: [EXTENSION] Socket (2.3.1)
Quote:
|
Re: [EXTENSION] Socket (2.3.1)
Quote:
Quote:
|
Re: [EXTENSION] Socket (2.3.1)
Hello
Im trying to getting Socket installed on my server, but im a noob at such things. But when i got it installed, and try to load it i get this error: [06] <FAILED> file "socket.ext.so": /home/game1/cstrike/addons/sourcemod/extensions/socket.ext.so: cannot open shared object file: No such file or directory When i check the directory, it seems like its ok, but i don't got: /home/game1/ i just got: ftp://<IP>/cstrike/... Can anyone help me please? Thx :) |
All times are GMT -4. The time now is 17:11. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.