SA-MP Forums Archive
[Plugin] [BETA] SA:MP Sockets Plugin - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] [BETA] SA:MP Sockets Plugin (/showthread.php?tid=171598)

Pages: 1 2 3 4 5


[BETA] SA:MP Sockets Plugin R2 - StrickenKid - 27.08.2010

SA:MP Sockets Plugin
Beta R2
Beta:
This is a BETA version, which means its not fully complete and stable, so, please post any bugs and errors you find!

ChangeLog:
About:
A couple months ago, I was experimenting with socket compatibilities through a SA:MP plugin (because dgram through SA:MP doesn't work). I completed the plugin a while back but I've put off releasing it because I was never able to find the time to test the plugin thoroughly. So, I've just decided to let you, the SA:MP community help do the testing! This plugin allows a SA:MP server to connect to TCP sockets, sending and receiving information from one server to another, or from a server to a client. You can either listen for sockets, or connect to a socket. For example: You could connect multiple SA:MP server's chats together, or create a custom rcon panel, or pretty much anything else.

How To Install:
Functions:
Callbacks:
Downloads (BETA R2):
Want To Compile It Yourself?
Post Comments And Questions!



Re: [BETA] SA:MP Sockets Plugin - Fj0rtizFredde - 27.08.2010

Sweet Im going to test it when I come home


Re: [BETA] SA:MP Sockets Plugin - Flake. - 27.08.2010

another great release thanks


Re: [BETA] SA:MP Sockets Plugin - Blacklite - 27.08.2010

Quote:
Originally Posted by Micheliano
Посмотреть сообщение
You could connect multiple SA:MP server's chats together
That's EXACTLY what we did when testing it =]

Good work SK!


Re: [BETA] SA:MP Sockets Plugin - pliva_sb - 27.08.2010

Quote:
Originally Posted by Blacklite
Посмотреть сообщение
That's EXACTLY what we did when testing it =]

Good work SK!
Really good work,I also work with socket as plugin but I don't have this idea.
Does it support multiconnection?
Did you test send a value?I think that isn't possible in this version.


Re: [BETA] SA:MP Sockets Plugin - armyoftwo - 27.08.2010

Can you create something like this with this plugin?
If yes it's amazing!!! [url..]http://www.youtube.com/watch?v=ZO_QtORVXdc[/.url]


Re: [BETA] SA:MP Sockets Plugin - Blacklite - 27.08.2010

Quote:
Originally Posted by armyoftwo
Посмотреть сообщение
Can you create something like this with this plugin?
If yes it's amazing!!! [url..]http://www.youtube.com/watch?v=ZO_QtORVXdc[/.url]
That's a different project, has nothing to do with this plugin.


Re: [BETA] SA:MP Sockets Plugin - MrDeath537 - 27.08.2010

Wooow, nice release.

Your plugins are always nice


Re: [BETA] SA:MP Sockets Plugin - ev0lution - 27.08.2010

The functions and callbacks provided confuse me.
If you listen on a port with socket_startlistening, will it accept any socket connections from any source, or only from other servers running this plugin and using socket_connect. Will it also call OnSocketConnect and OnSocketRecieve (which should be OnSocketReceive) as normal?

@Blacklite: I don't think you realised Micheliano quoted StrickenKid, he said that in the original post. (and I'm guessing you tested it with him)

EDIT: When trying to bind to the server port (7777) I got "Error: Function: start_listening is already listening. Error id: 2" upon calling the function, then "[Socket] Started listening on port 7777." after the gamemode had loaded. (I'm using it in a filterscript)


Re: [BETA] SA:MP Sockets Plugin - nielsbon1 - 27.08.2010

W00t nice this will come very handy! Thanks


Re: [BETA] SA:MP Sockets Plugin - Kyosaur - 27.08.2010

This makes me wonder why the datagram was removed in the first place. *shrugs*


I cant honestly say i see a good use for this, but regardless nice job.


Re: [BETA] SA:MP Sockets Plugin - WillyP - 27.08.2010

blacklite and sk are pwnage but bob is just hawt <3


Re: [BETA] SA:MP Sockets Plugin - Scenario - 27.08.2010

This will help me in the future a lot! Thank you! I'll be testing and reporting all bugs I find!


Re: [BETA] SA:MP Sockets Plugin - Dark_Kostas - 27.08.2010

Quote:
Originally Posted by ev0lutionnn
Посмотреть сообщение
EDIT: When trying to bind to the server port (7777) I got "Error: Function: start_listening is already listening. Error id: 2" upon calling the function, then "[Socket] Started listening on port 7777." after the gamemode had loaded. (I'm using it in a filterscript)
if your server port is 7777 too then i dont think you can do it.


Re: [BETA] SA:MP Sockets Plugin - CJ101 - 27.08.2010

i was just thinking, could this listen on port 21 and auto-restart the server when a new .amx is uploaded?


Re: [BETA] SA:MP Sockets Plugin - Victor - 27.08.2010

Quote:
Originally Posted by CoaPsyFactor
Посмотреть сообщение
you can hack servers with this
offtopic: ....

OnTopic: Nice plugin I can make use of this


Re: [BETA] SA:MP Sockets Plugin - Toni - 27.08.2010

Very nice, But I have a question, as Armyoftwo posted that link...is it possible to create custom dialogs to chat like that in SA:MP?


Re: [BETA] SA:MP Sockets Plugin - [L3th4l] - 27.08.2010

Nice, i have seen similar types of abilities on my friends server.


Re: [BETA] SA:MP Sockets Plugin - nemesis- - 28.08.2010

The possibilities with a plugin of this nature are endless.


Re: [BETA] SA:MP Sockets Plugin - ev0lution - 28.08.2010

Some problems, from a Windows server:

1. Occasionally the plugin returns WSA error code 10004 or 10038 - usually with 10004 the function called works as normal
2. Occasionally the plugin claims that socket_send fails, or that the "last receive failed", when neither do, and they both actually work
3. If a client connects, sends something to the server and disconnects, the plugin doesn't handle it fast enough, and crashes after "Client x closed the connection" (before it calls OnSocketRecieve)
4. Unless I'm missing something, the plugin seems to only ever send 4 bytes per socket_send call. For example, I connected via a PHP script (the client) and wrote 12 bytes to the socket. The server-side script uses socket_send to send "thisisatest" back to the connected client. The connected client receives "test". It seems to be the same with any string sent.. only 4 bytes are sent.

Great plugin though, I'm using it for a project now which wouldn't have been possible without it. Very useful, just needs a few bugs fixed. :P