mirror of
https://github.com/tio/tio.git
synced 2026-05-01 23:07:58 +02:00
Print socket info at startup
This commit is contained in:
parent
7096bc3a96
commit
b0b0856a8b
2 changed files with 5 additions and 3 deletions
|
|
@ -72,9 +72,6 @@ int main(int argc, char *argv[])
|
||||||
if (option.log)
|
if (option.log)
|
||||||
log_open(option.log_filename);
|
log_open(option.log_filename);
|
||||||
|
|
||||||
/* Open socket */
|
|
||||||
socket_configure();
|
|
||||||
|
|
||||||
/* Enable ANSI text formatting (colors etc.) */
|
/* Enable ANSI text formatting (colors etc.) */
|
||||||
print_enable_ansi_formatting();
|
print_enable_ansi_formatting();
|
||||||
|
|
||||||
|
|
@ -82,6 +79,9 @@ int main(int argc, char *argv[])
|
||||||
tio_printf("tio v%s", VERSION);
|
tio_printf("tio v%s", VERSION);
|
||||||
tio_printf("Press ctrl-t q to quit");
|
tio_printf("Press ctrl-t q to quit");
|
||||||
|
|
||||||
|
/* Open socket */
|
||||||
|
socket_configure();
|
||||||
|
|
||||||
/* Connect to tty device */
|
/* Connect to tty device */
|
||||||
if (option.no_autoconnect)
|
if (option.no_autoconnect)
|
||||||
status = tty_connect();
|
status = tty_connect();
|
||||||
|
|
|
||||||
|
|
@ -92,6 +92,8 @@ void socket_configure(void)
|
||||||
|
|
||||||
memset(clientfds, -1, sizeof(clientfds));
|
memset(clientfds, -1, sizeof(clientfds));
|
||||||
atexit(socket_exit);
|
atexit(socket_exit);
|
||||||
|
|
||||||
|
tio_printf("Listening on socket %s", socket_filename());
|
||||||
}
|
}
|
||||||
|
|
||||||
void socket_write(char input_char)
|
void socket_write(char input_char)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue