Merge pull request #3812 from Biswa96/meson-add-geany-icon
[geany-mirror.git] / src / socket.h
blobd81645e46b397270b5b7e484c6e6c5c5d35bcb83
1 /*
2 * socket.h - this file is part of Geany, a fast and lightweight IDE
4 * Copyright 2006 The Geany contributors
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef GEANY_SOCKET_H
23 #define GEANY_SOCKET_H 1
25 #include <glib.h>
27 G_BEGIN_DECLS
29 /* Used on Windows for TCP socket based IPC.
30 * The port number is just random but should be below 49152 as Hyper-V tends to bind
31 * dynamic port ranges from 49152 to 65535. */
32 #define SOCKET_WINDOWS_REMOTE_CMD_PORT 45937
34 struct SocketInfo
36 gboolean ignore_socket;
37 gchar *file_name;
38 GIOChannel *read_ioc;
39 gint lock_socket;
40 guint lock_socket_tag;
43 extern struct SocketInfo socket_info;
45 gint socket_init(gint argc, gchar **argv, gushort socket_port);
47 gboolean socket_lock_input_cb(GIOChannel *source, GIOCondition condition, gpointer data);
49 gint socket_finalize(void);
51 G_END_DECLS
53 #endif /* GEANY_SOCKET_H */