[Plugin] Socket plugin (v0.2b released)

Hi,

i have an issue with this plugin.
The server seems to close connections to the connected clients randomly (gmx/restart of the server is not triggered)

This is my pawn code where i bind and listen for connections/data:
pawn Код:
#include <a_samp>
#include <socket>

new Socket:CLIENT_SOCKET;
#define SOCKET_PORT 7785
#define SOCKET_MAX_CONNECTION 25

new connected_remote_clients;

public OnGameModeInit()
{
    new ip[16];
    GetServerVarAsString("bind", ip, sizeof (ip));
   
    connected_remote_clients=0;
   
    CLIENT_SOCKET = socket_create(TCP);
    if(is_socket_valid(CLIENT_SOCKET))
    {
        socket_set_max_connections(CLIENT_SOCKET, SOCKET_MAX_CONNECTION);
        socket_bind(CLIENT_SOCKET, ip);
        socket_listen(CLIENT_SOCKET, SOCKET_PORT);
    }
    return 1;
}

public OnGameModeExit()
{
    if(is_socket_valid(CLIENT_SOCKET))socket_destroy(CLIENT_SOCKET);
    return 1;
}

public onSocketRemoteConnect(Socket:id, remote_client[], remote_clientid)
{
    connected_remote_clients++;
    return 1;
}

public onSocketReceiveData(Socket:id, remote_clientid, data[], data_len)
{
    print(data);
    SendSocketMessageToAllClients(data);
    return 1;
}

public OnPlayerText(playerid, text[])
{
    SendSocketMessageToAllClients(text);
    return 1;
}

forward SendSocketMessageToAllClients(socket_message[]);
public SendSocketMessageToAllClients(socket_message[])
{
    for(new client_i=0; client_i<connected_remote_clients; client_i++)
    {
        if(is_socket_valid(CLIENT_SOCKET))socket_sendto_remote_client(CLIENT_SOCKET, client_i, socket_message);
    }
    return 1;
}
I made an app (=client) that connects to the server chat.
Works just fine.
BUT, from time to time (totally random it seems), i get this error message on the client side:
PHP код:
[Errno 10054An existing connection was forcibly closed by the remote host
Seems like the server randomly closes the conenction to my clients?
Can you give me a hint where to look for the bug?
Or is it another bug by the plugin, an issue you already know about?

Someone experienced this before?
Im running this on linux.

Thank you!
Reply


Messages In This Thread
Socket plugin (v0.2b released) - by BlueG - 13.04.2012, 10:41
Re: Socket plugin - by Shabi RoxX - 13.04.2012, 10:44
Re: Socket plugin - by Mauzen - 13.04.2012, 10:45
AW: Socket plugin - by C0dy09 - 13.04.2012, 10:51
Re: Socket plugin - by DRIFT_HUNTER - 13.04.2012, 11:00
Re: Socket plugin (TCP/UDP) v0.1a - by Kar - 13.04.2012, 11:31
Re: Socket plugin (TCP/UDP) v0.1a - by AirKite - 13.04.2012, 11:46
Re: Socket plugin (TCP/UDP) v0.1a - by TheArcher - 13.04.2012, 11:50
Re: Socket plugin (TCP/UDP) v0.1a - by QuaTTrO - 13.04.2012, 12:08
Re: Socket plugin (TCP/UDP) v0.1a - by zSuYaNw - 13.04.2012, 12:14
Re: Socket plugin (TCP/UDP) v0.1a - by MicroD - 13.04.2012, 15:01
Re: Socket plugin (TCP/UDP) v0.1a - by Amit_B - 13.04.2012, 15:05
Re: Socket plugin (TCP/UDP) v0.1a - by Ricop522 - 13.04.2012, 15:10
AW: Socket plugin (TCP/UDP) v0.1a - by Nanory - 13.04.2012, 15:19
Re: AW: Socket plugin (TCP/UDP) v0.1a - by TheArcher - 13.04.2012, 15:32
Respuesta: Socket plugin (TCP/UDP) v0.1a - by Jovanny - 13.04.2012, 22:26
Re: Socket plugin (TCP/UDP) v0.1a - by steki. - 13.04.2012, 22:51
Re: Socket plugin (TCP/UDP) v0.1a - by Lorenc_ - 14.04.2012, 22:49
Re: Socket plugin (TCP/UDP) v0.1a - by Crimson - 15.04.2012, 13:42
AW: Socket plugin (TCP/UDP) v0.1a - by AlexLS95 - 15.04.2012, 14:25
Re: AW: Socket plugin (TCP/UDP) v0.1a - by Crimson - 15.04.2012, 15:33
AW: Socket plugin (TCP/UDP) v0.1a - by AlexLS95 - 15.04.2012, 15:56
Re: Socket plugin (TCP/UDP) v0.1a - by dEzIRE - 15.04.2012, 16:45
Re: AW: Socket plugin (TCP/UDP) v0.1a - by Vince - 15.04.2012, 17:40
Re: AW: Socket plugin (TCP/UDP) v0.1a - by TheArcher - 15.04.2012, 18:48
Re: Socket plugin (TCP/UDP) v0.1a - by AndreT - 15.04.2012, 19:06
Re: Socket plugin (TCP/UDP) v0.1a - by dEzIRE - 18.04.2012, 14:43
AW: Socket plugin (TCP/UDP) v0.1a - by Meta - 18.04.2012, 14:55
Re: Socket plugin (TCP/UDP) v0.1a - by pownayge - 23.04.2012, 14:21
Re: Socket plugin (TCP/UDP) v0.1a - by T101 - 24.04.2012, 14:03
Respuesta: Socket plugin (TCP/UDP) v0.1a - by Francis. - 26.04.2012, 01:08
Respuesta: Socket plugin (TCP/UDP) v0.1a - by Jovanny - 26.04.2012, 03:31
Re: Socket plugin (TCP/UDP) v0.1a - by AndreT - 26.04.2012, 16:34
Re: Socket plugin (TCP/UDP) v0.1a - by BlueRey - 07.05.2012, 14:56
Re: Socket plugin (TCP/UDP) v0.1a - by Vince - 07.05.2012, 16:29
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 12.05.2012, 14:31
AW: Socket plugin (TCP/UDP) v0.1a - by C0dy09 - 12.05.2012, 16:30
Re: Socket plugin (TCP/UDP) v0.1a - by AndreT - 12.05.2012, 17:00
AW: Socket plugin (TCP/UDP) v0.1a - by C0dy09 - 12.05.2012, 18:36
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 12.05.2012, 20:55
Re: Socket plugin (TCP/UDP) v0.1a - by AndreT - 12.05.2012, 21:05
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 12.05.2012, 21:12
Re: Socket plugin (TCP/UDP) v0.1a - by AndreT - 13.05.2012, 06:58
AW: Socket plugin (TCP/UDP) v0.1a - by C0dy09 - 13.05.2012, 10:05
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 13.05.2012, 13:33
Re: Socket plugin (TCP/UDP) v0.1a - by Hiddos - 13.05.2012, 14:07
Re: Socket plugin (TCP/UDP) v0.1a - by T101 - 15.05.2012, 20:37
Re: Socket plugin (TCP/UDP) v0.1a - by BlueG - 20.05.2012, 16:23
Re: Socket plugin (TCP/UDP) v0.1a - by Jonny5 - 20.05.2012, 16:57
Re: Socket plugin (TCP/UDP) v0.1a - by T101 - 22.05.2012, 04:59
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 08.06.2012, 19:29
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 12.06.2012, 00:19
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 13.06.2012, 20:35
Re: Socket plugin (TCP/UDP) v0.1a - by VeryGooD - 15.06.2012, 09:37
Re: Socket plugin (TCP/UDP) v0.1a - by Misiek - 16.06.2012, 00:43
Re: Socket plugin (TCP/UDP) v0.1a - by Misiek - 16.06.2012, 01:33
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 18.06.2012, 16:54
Re: Socket plugin (TCP/UDP) v0.1a - by pyrodave - 18.06.2012, 17:29
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 18.06.2012, 17:50
Re: Socket plugin (TCP/UDP) v0.1a - by pyrodave - 18.06.2012, 17:56
Re: Socket plugin (TCP/UDP) v0.1a - by Luis- - 18.06.2012, 20:23
Re: Socket plugin (TCP/UDP) v0.1a - by AndreT - 18.06.2012, 20:32
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Misiek - 27.06.2012, 22:26
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by T101 - 01.07.2012, 02:09
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Kwarde - 09.07.2012, 11:18
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Kirollos - 10.07.2012, 03:27
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by bocian941 - 10.07.2012, 09:44
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Kirollos - 10.07.2012, 15:35
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Sgt.TheDarkness - 15.07.2012, 03:35
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by T101 - 21.07.2012, 07:52
Re : Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Kyra - 19.08.2012, 05:28
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Kar - 21.08.2012, 17:40
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by darklight94 - 28.08.2012, 18:34
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by T101 - 29.09.2012, 03:21
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by BJIADOKC - 22.10.2012, 15:16
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by KoczkaHUN - 22.10.2012, 15:43
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Lordzy - 22.10.2012, 15:49
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Plovix - 08.11.2012, 12:27
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Jeroen52 - 09.12.2012, 19:31
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by zgintasz - 22.12.2012, 18:25
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Jeroen52 - 22.12.2012, 18:38
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by zgintasz - 24.12.2012, 15:13
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by zgintasz - 27.12.2012, 17:25
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by BJIADOKC - 09.01.2013, 03:38
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Yiin - 12.01.2013, 09:09
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by BJIADOKC - 12.01.2013, 09:42
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Yiin - 12.01.2013, 11:18
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by Jeroen52 - 12.01.2013, 15:37
Re: Socket plugin (TCP/UDP) v0.1b (24/06/12) - by DJloko - 13.01.2013, 20:40
Re: Socket plugin (SSL support u/c) - by Kyle - 26.02.2013, 13:37
Re: Socket plugin (SSL support u/c) - by VIRUXE - 26.02.2013, 15:35
Re: Socket plugin (SSL support u/c) - by Mr.GeEk - 26.02.2013, 16:13
Re: Socket plugin (SSL support u/c) - by [FoD]Kanii - 09.03.2013, 14:19
Re: Socket plugin (SSL support u/c) - by CROSS_Hunter - 10.03.2013, 12:36
AW: Socket plugin (SSL support u/c) - by svenron - 10.03.2013, 12:41
Re: AW: Socket plugin (SSL support u/c) - by Jeroen52 - 10.03.2013, 12:42
Re: Socket plugin (SSL support u/c) - by TheArcher - 10.03.2013, 12:44
Re: Socket plugin (SSL support u/c) - by Jeroen52 - 10.03.2013, 12:46
Re: Socket plugin (SSL support u/c) - by [FoD]Kanii - 10.03.2013, 12:52
Re: Socket plugin (SSL support u/c) - by Jeroen52 - 10.03.2013, 12:53
AW: Re: Socket plugin (SSL support u/c) - by svenron - 10.03.2013, 12:54
Re: Socket plugin (SSL support u/c) - by [FoD]Kanii - 10.03.2013, 12:54
Re: Socket plugin (SSL support u/c) - by Ancevt - 16.03.2013, 18:13
Respuesta: Socket plugin (SSL support u/c) - by Dreyfuz - 16.03.2013, 19:08
Re: Socket plugin (SSL support u/c) - by Jeroen52 - 17.03.2013, 19:44
Respuesta: Socket plugin (SSL support u/c) - by sergios - 10.07.2013, 14:59
Re: Respuesta: Socket plugin (SSL support u/c) - by Jeroen52 - 10.07.2013, 15:02
Respuesta: Re: Respuesta: Socket plugin (SSL support u/c) - by sergios - 10.07.2013, 15:08
Re: Respuesta: Re: Respuesta: Socket plugin (SSL support u/c) - by Jeroen52 - 10.07.2013, 15:15
Respuesta: Re: Respuesta: Re: Respuesta: Socket plugin (SSL support u/c) - by sergios - 10.07.2013, 15:23
Respuesta: Socket plugin (SSL support u/c) - by Noobster157 - 15.07.2013, 01:51
Re: Respuesta: Socket plugin (SSL support u/c) - by Jeroen52 - 15.07.2013, 01:56
Re: Socket plugin (SSL support u/c) - by DRIFT_HUNTER - 15.07.2013, 02:48
Re: Socket plugin (SSL support u/c) - by P3ti - 16.07.2013, 05:50
Re: Socket plugin (SSL support u/c) - by Reboma - 26.07.2013, 16:28
Re: Socket plugin (SSL source online) - by cyb3r - 30.08.2013, 19:28
Re: Socket plugin (SSL source online) - by ViruZz - 30.08.2013, 19:34
Re: Socket plugin (SSL source online) - by cyb3r - 30.08.2013, 19:37
Re: Socket plugin (SSL source online) - by cyb3r - 30.08.2013, 20:21
Re: Socket plugin (v0.2b released) - by Dragony92 - 29.09.2014, 03:56
Re: Socket plugin (v0.2b released) - by Dragony92 - 01.10.2014, 01:24
Re: Socket plugin (v0.2b released) - by Seregamil1 - 20.11.2014, 09:36
Re: Socket plugin (v0.2b released) - by Seregamil1 - 22.11.2014, 08:36
Re : Socket plugin (v0.2b released) - by LOCS - 23.11.2014, 20:28
Re: Socket plugin (v0.2b released) - by Mauzen - 23.11.2014, 20:37
Re: Socket plugin (v0.2b released) - by ZombieNest - 07.12.2014, 05:46
Re: Socket plugin (v0.2b released) - by shadow177 - 17.12.2014, 14:04
Re: Socket plugin (v0.2b released) - by MikE1990 - 18.12.2014, 11:32
Re: Socket plugin (v0.2b released) - by JernejL - 07.01.2015, 07:59
Re: Socket plugin (v0.2b released) - by JernejL - 15.01.2015, 11:10
Re: Socket plugin (v0.2b released) - by [HLF]Southclaw - 18.01.2015, 12:39
Re: Socket plugin (v0.2b released) - by zwoorelook - 05.02.2015, 06:31
Re: Socket plugin (v0.2b released) - by Bashur - 22.02.2015, 16:46
Respuesta: Socket plugin (v0.2b released) - by dgor - 23.02.2015, 18:31
Re: Socket plugin (v0.2b released) - by arlindi - 25.02.2015, 21:37
Re: Socket plugin (v0.2b released) - by Maximus0 - 26.02.2015, 03:05
Re: Socket plugin (v0.2b released) - by arlindi - 26.02.2015, 11:47
Re: Socket plugin (v0.2b released) - by Crystallize - 26.02.2015, 14:49
Re: Socket plugin (v0.2b released) - by Crystallize - 26.02.2015, 14:54
Re: Socket plugin (v0.2b released) - by Shinta307 - 31.12.2015, 11:44
Re: Socket plugin (v0.2b released) - by Jeroen52 - 31.12.2015, 11:53
Re: Socket plugin (v0.2b released) - by Shinta307 - 31.12.2015, 12:16
Re: Socket plugin (v0.2b released) - by Jeroen52 - 31.12.2015, 12:20
Re: Socket plugin (v0.2b released) - by Shinta307 - 31.12.2015, 12:29
Re: Socket plugin (v0.2b released) - by Jeroen52 - 31.12.2015, 13:18
Re: Socket plugin (v0.2b released) - by Shinta307 - 31.12.2015, 18:29
Re: Socket plugin (v0.2b released) - by Jeroen52 - 31.12.2015, 19:03
Re: Socket plugin (v0.2b released) - by Shinta307 - 01.01.2016, 07:06
Re: Socket plugin (v0.2b released) - by Johurt - 05.01.2016, 18:55
Re: Socket plugin (v0.2b released) - by Semikola - 06.01.2016, 07:12
Re: Socket plugin (v0.2b released) - by bruxo00 - 07.01.2016, 16:48
Re: Socket plugin (v0.2b released) - by xyyy018 - 19.02.2016, 12:52
Re: Socket plugin (v0.2b released) - by CSCripMa - 24.02.2016, 09:25
Re: Socket plugin (v0.2b released) - by Jeroen52 - 24.02.2016, 09:28
Re: Socket plugin (v0.2b released) - by CSCripMa - 24.02.2016, 09:40
Re: Socket plugin (v0.2b released) - by DRIFT_HUNTER - 24.02.2016, 17:44
Re: Socket plugin (v0.2b released) - by bsHoX - 25.02.2016, 09:12
Re: Socket plugin (v0.2b released) - by Gigi-The-Beast - 25.02.2016, 10:48
Re: Socket plugin (v0.2b released) - by RaeF - 27.02.2016, 03:14
Re: Socket plugin (v0.2b released) - by ScIrUsna - 14.03.2016, 11:33
Re: Socket plugin (v0.2b released) - by ScIrUsna - 14.03.2016, 16:19
Re: Socket plugin (v0.2b released) - by Kar - 25.04.2016, 14:59
Re: Socket plugin (v0.2b released) - by Gigi-The-Beast - 25.04.2016, 16:05
Re: Socket plugin (v0.2b released) - by Kar - 26.04.2016, 03:36
Re: Socket plugin (v0.2b released) - by Gigi-The-Beast - 26.04.2016, 08:49
Re: Socket plugin (v0.2b released) - by maddinat0r - 26.04.2016, 10:30
Re: Socket plugin (v0.2b released) - by Omirrow - 23.07.2017, 19:32
Re: Socket plugin (v0.2b released) - by Spmn - 24.07.2017, 00:15
Re: Socket plugin (v0.2b released) - by Omirrow - 01.08.2017, 19:48
Re: Socket plugin (v0.2b released) - by GGRPSkripter - 10.08.2017, 15:34
Re: Socket plugin (v0.2b released) - by oMa37 - 28.09.2017, 21:40
Re: Socket plugin (v0.2b released) - by Kaperstone - 06.10.2017, 15:56
Re: Socket plugin (v0.2b released) - by Shaneisace - 16.10.2017, 09:09
Re: Socket plugin (v0.2b released) - by PawnoQ - 06.12.2017, 21:34
Re: Socket plugin (v0.2b released) - by PawnoQ - 13.12.2017, 17:08
Re: Socket plugin (v0.2b released) - by Kaperstone - 17.01.2018, 05:39
Re: Socket plugin (v0.2b released) - by jlalt - 17.01.2018, 06:57
Re: Socket plugin (v0.2b released) - by Kaperstone - 30.01.2018, 06:17
Re: Socket plugin (v0.2b released) - by AlejandroOrtega - 10.02.2018, 14:39
Re: Socket plugin (v0.2b released) - by Kaperstone - 11.02.2018, 07:56
Re: Socket plugin (v0.2b released) - by DeitY - 21.02.2018, 20:05
Re: Socket plugin (v0.2b released) - by Kaperstone - 21.02.2018, 21:01
Re: Socket plugin (v0.2b released) - by DeitY - 21.02.2018, 21:02
Re: Socket plugin (v0.2b released) - by KessMan - 02.08.2018, 10:54
Re: Socket plugin (v0.2b released) - by haoss - 02.08.2018, 12:11
Re: Socket plugin (v0.2b released) - by KessMan - 02.08.2018, 12:23
Re: Socket plugin (v0.2b released) - by Chaprnks - 12.08.2018, 04:29
Re: Socket plugin (v0.2b released) - by Kaperstone - 12.08.2018, 04:55
Re: Socket plugin (v0.2b released) - by Unkovic - 14.08.2018, 12:55
Re: Socket plugin (v0.2b released) - by dotSILENT - 14.08.2018, 15:44

Forum Jump:


Users browsing this thread: 1 Guest(s)