handle to channel rename

This commit is contained in:
Ailin Nemui 2026-01-23 21:03:18 +01:00
commit ac1f621972
22 changed files with 355 additions and 335 deletions

View file

@ -1,24 +1,26 @@
#ifndef IRSSI_CORE_NET_SENDBUFFER_H
#define IRSSI_CORE_NET_SENDBUFFER_H
#include <irssi/src/common.h>
#define DEFAULT_BUFFER_SIZE 8192
#define MAX_BUFFER_SIZE 1048576
struct _NET_SENDBUF_REC {
GIOChannel *handle;
LINEBUF_REC *readbuffer; /* receive buffer */
GIOChannel *channel;
LINEBUF_REC *readbuffer; /* receive buffer */
int send_tag;
int bufsize;
int bufpos;
char *buffer; /* Buffer is NULL until it's actually needed. */
int def_bufsize;
unsigned int dead:1;
int send_tag;
int bufsize;
int bufpos;
char *buffer; /* Buffer is NULL until it's actually needed. */
int def_bufsize;
unsigned int dead : 1;
};
/* Create new buffer - if `bufsize' is zero or less, DEFAULT_BUFFER_SIZE
is used */
NET_SENDBUF_REC *net_sendbuffer_create(GIOChannel *handle, int bufsize);
NET_SENDBUF_REC *net_sendbuffer_create_channel(GIOChannel *channel, int bufsize);
/* Destroy the buffer. `close' specifies if socket handle should be closed. */
void net_sendbuffer_destroy(NET_SENDBUF_REC *rec, int close);
@ -33,6 +35,6 @@ int net_sendbuffer_receive_line(NET_SENDBUF_REC *rec, char **str, int read_socke
void net_sendbuffer_flush(NET_SENDBUF_REC *rec);
/* Returns the socket handle */
GIOChannel *net_sendbuffer_handle(NET_SENDBUF_REC *rec);
GIOChannel *net_sendbuffer_channel(NET_SENDBUF_REC *rec);
#endif