laserlaser Posted August 6, 2012 Posted August 6, 2012 Module:Sockets I proudly present you ml_sockets a c++ extension for mta 1.0, it was made by BlueG for SAMP and translated to MTA by me. The module adds socket functions & events to mta, sockets are used for communication between computers. See wikipedia for more info: http://en.wikipedia.org/wiki/Internet_socket Installation: - download ml_sockets (https://rapidshare.com/files/2826542902/ml_sockets.zip) - unzip - place ml_sockets in (..server\mods\deathmatch\modules) - add the module to your mtaserver.conf ( or for linux) - restart the server or write to console "loadmodule ml_sockets(.dll,.so)" Functions: int socket_create(int protocolType); -- udp & tcp , 1:TCP, 2:UDP -> Returns socket_id bool socket_bind(int socket_id, string ip); -- udp & tcp bool socket_connect(int socket_id, string host, int port); -- udp & tcp bool socket_listen(int socket_id, int port); -- udp & tcp bool socket_stop_listen(int socket_id); -- udp & tcp bool socket_destroy(int socket_id); -- udp & tcp bool socket_send(int socket_id, string data, int len); -- udp & tcp bool is_socket_valid(int socket_id); -- udp & tcp bool socket_set_max_connections(int socket_id, int max_remote_clients); -- tcp only bool socket_close_remote_client(int socket_id, int remote_clientid); -- tcp only bool socket_sendto_remote_client(int socket_id, int remote_clientid, string data); -- tcp only bool socket_remote_client_connected(int socket_id, int remote_clientid); -- tcp only string get_remote_client_ip(int socket_id, int remote_clientid); -- tcp only Events: -- client & server (udp) onUDPReceiveData(int socket_id, string data, data_len, string remote_client_ip, int remote_client_port); -- client only (tcp) onSocketAnswer(int socket_id, string data, int data_len); -- called when socket_connect() has been used and the server sends data onSocketClose(int socket_id); -- server only (tcp) onSocketReceiveData(int socket_id, int remote_clientid, string data, int data_len); -- called when a remote client sends data onSocketRemoteConnect(int socket_id, string remote_client, int remote_clientid); -- called when a remote client connects to our socket server onSocketRemoteDisconnect(int socket_id, int remote_clientid); -- called when a remote client disconnects from our socket server Both of all events source always N/A Tutorials will be added soon. I will be include this to my javaSDK for callJava
MTA Team qaisjp Posted August 7, 2012 MTA Team Posted August 7, 2012 Connecting irc<->server Connecting Tf2 chat somehow to MTA chat e_e
Anderl Posted August 7, 2012 Posted August 7, 2012 Amazing job that you're doing laserlaser! It's good to see people doing these type of things, making MTA:SA grow up more.
Geramy92 Posted December 1, 2012 Posted December 1, 2012 can anyone give me an download link? the link given in the first post isn't working anymore.
MCvarial Posted December 1, 2012 Posted December 1, 2012 It would be nice to rename your module so people don't get confused with the current sockets module. https://wiki.multitheftauto.com/wiki/Modules/Sockets
NeXTreme Posted December 29, 2012 Posted December 29, 2012 Download link seems to be broken, could you post a new one?
Scripting Moderators Sarrum Posted December 30, 2012 Scripting Moderators Posted December 30, 2012 Download: link
Geramy92 Posted January 3, 2013 Posted January 3, 2013 thanks for link =) but i have a problem with this module my steps: 1) copied ml_sockets.dll in to the folder modules 2) server.config: 3) startet the server now i get this error: [2013-01-03 10:08:20] MODULE: Unable to find modules/ml_sockets.dll! can you help me? in use the mta_mysql.dll module too, and this is working fine
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now