[Github-comments] [geany/geany] Windows: Make TCP socket port number configurable (#2585)
Matthew Brush
notifications at xxxxx
Sun Sep 13 22:03:35 UTC 2020
@codebrainz commented on this pull request.
> + gint port_number;
+
+ if (! g_file_test(configfile, G_FILE_TEST_IS_REGULAR))
+ {
+ geany_debug(
+ "No user config file found, use default TCP port (%s).",
+ SOCKET_WINDOWS_REMOTE_CMD_PORT);
+ g_free(configfile);
+ return SOCKET_WINDOWS_REMOTE_CMD_PORT;
+ }
+ g_key_file_load_from_file(config, configfile, G_KEY_FILE_NONE, NULL);
+ port_number = utils_get_setting_integer(config, PACKAGE, "socket_remote_cmd_port",
+ SOCKET_WINDOWS_REMOTE_CMD_PORT);
+ geany_debug("Using TCP port number %d for IPC", port_number);
+ g_free(configfile);
+ g_key_file_free(config);
NP.
I don't know the convention on Win32, but ports under 1024 are ["well known" ports](https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers#Well-known_ports), that's why I put that (although it was off-by-one :) Likely not necessary since Win32 doesn't seem to mind.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2585#discussion_r487582822
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20200913/79d9c662/attachment.htm>
More information about the Github-comments
mailing list