Implemented network transmit buffer. If all data couldn't be sent

immediately, it's sent after a small timeout. This cleans up some code
with IRC command sending.


git-svn-id: http://svn.irssi.org/repos/irssi/trunk@478 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-07-16 19:00:41 +00:00 committed by cras
commit ee226421f1
8 changed files with 238 additions and 49 deletions

View file

@ -23,6 +23,7 @@
#include "commands.h"
#include "network.h"
#include "net-nonblock.h"
#include "net-sendbuffer.h"
#include "line-split.h"
#include "settings.h"
@ -281,7 +282,7 @@ static void cmd_dcc_chat(const char *data, IRC_SERVER_REC *server)
if (server == NULL || !server->connected)
cmd_param_error(CMDERR_NOT_CONNECTED);
if (net_getsockname(server->handle, &own_ip, NULL) == -1)
if (net_getsockname(net_sendbuffer_handle(server->handle), &own_ip, NULL) == -1)
cmd_param_error(CMDERR_ERRNO);
port = settings_get_int("dcc_port");