|
|
#1 |
|
Big Clucker
![]() ![]() Join Date: Jun 2011
Location: Bowmanville, Ontario
Posts: 73
Reputation: 1
|
WinSock Plugin - Beta 1.2
This plugin is a functioning, windows-only socket plugin I designed as per a friend's request. This plugin uses assigned IDs to manage multiple connections simultaneously, it uses threading for reading and listening and the main thread for sending data and connecting. This plugin supports only one connection per socket at any given time, once a connection is accepted by a listening socket it will turn into an active socket, an active socket must be disconnected before it can connect or listen for another connection. Big credit to StrickenKid for releasing the source to some of his work, an effective tutorial in its own rights. This version only works under Windows operating systems with support for WinSock 2.2. Modifying it to be cross-platform compatible is currently being considered. Functions pawn Code:
Callbacks pawn Code:
![]() Changelog Version 1.2
Version 1.1
Last edited by langricr; 17/06/2011 at 03:46 AM. Reason: Version 1.2 + Better image |
|
|
|
|
|
#2 |
|
Guest
Posts: n/a
|
This is AWESOME, excellent job, completely intelligent.
Can you release the source of the plugin? |
|
|
|
#3 |
|
Big Clucker
![]() ![]() Join Date: Jun 2011
Location: Bowmanville, Ontario
Posts: 73
Reputation: 1
|
|
|
|
|
|
|
#4 |
|
Guest
Posts: n/a
|
Thanks for this release, I plan making a remote rcon with custom commands with this.
|
|
|
|
#5 | |
|
Big Clucker
![]() ![]() Join Date: Jun 2011
Location: Bowmanville, Ontario
Posts: 73
Reputation: 1
|
Quote:
![]() The whole reason I made this was so me and said friend could design a network protocol and create scripts in other languages, the server would run a bare script that executes functions based on the packets received through the connection to a server made in another language. |
|
|
|
|
|
|
#6 | |
|
Guest
Posts: n/a
|
Quote:
|
|
|
|
|
#7 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Feb 2010
Location: ES
Posts: 2,699
Reputation: 148
|
This is AWESOME, excellent job, completely intelligent.²
|
|
|
|
|
|
#8 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Feb 2009
Posts: 778
Reputation: 39
|
I can see you've stolen code, and the basic architecture from my sockets plugin.
|
|
|
|
|
|
#9 |
|
Big Clucker
![]() ![]() Join Date: Jun 2011
Location: Bowmanville, Ontario
Posts: 73
Reputation: 1
|
Yes, I did use part of your code as a reference having rarely programmed in C++ before, but when my friend mentioned that your plugin failed to operate and that you weren't willing to repair it ( on top of it only supporting one socket), I opted to create a replacement. The only code I explicitly copied was the GetString method and the basic callback loop when locating amx methods. Other than that, please point out how I've stolen your "basic architecture".
|
|
|
|
|
|
#10 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Feb 2009
Posts: 778
Reputation: 39
|
I'm not going to waste my time over this, but if you put both the projects side by side and compare.... It looks like you've just changed a few things around, changed the order of some functions, and added the functionality of multiple connections.... I've also noticed some problems with yours which will drastically affect the operation of it.
But all that aside, you should have at least given me credit, or even asked for permission... You have just copied code from my work. Also, Code:
/** * SA:MP WinSock * (c) Copyright 2010, <__Ethan__> * **/ #if defined _winsock_inc #endinput #endif #define _winsock_inc #pragma library winsock // plugin natives native socket_create( id ); native socket_destroy( id ); native socket_id_available( id ); native socket_connect( id, ip[], port); native socket_disconnect( id ); native socket_listen( id, port ); native socket_stoplisten( id ); native socket_send( id, data[] ); // plugin callbacks forward onSocketConnect( id, ip[], port ); forward onSocketDisconnect( id ); forward onSocketReceive( id, data[] ); |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Plugin] MapAndreas plugin v1.0 beta | Kalcor | Plugin Development | 232 | 13/04/2013 08:33 AM |
| [FilterScript] [FS] IRC Administrator and Echo FS for Jacobs IRC plugin (using zcmd beta) | Zezombia | Filterscripts | 97 | 22/03/2013 01:04 PM |
| [Plugin] [BETA] SA:MP Sockets Plugin | StrickenKid | Plugin Development | 99 | 10/02/2013 05:29 PM |
| [BETA] SA:MP Sockets Plugin | SPAWN_METAL | Русский/Russian | 2 | 10/05/2011 07:11 AM |
| Where can i get the beta of samp 0.3 ? | reashaun14 | Client Support | 1 | 20/09/2009 11:53 PM |