added underline to client startup

This commit is contained in:
Václav Šmejkal 2023-02-21 07:41:35 +01:00
parent 76448104b7
commit f185d89bc2
Signed by: ENGO150
GPG Key ID: F6D6DF86242C5A59

View File

@ -34,11 +34,14 @@ int main(void)
server_addr.sin_port = htons(SERVER_PORT);
server_addr.sin_addr.s_addr = INADDR_ANY;
//GET IP
printf("Welcome.\n\nEnter IP Address:\n>>> ");
getline(&line, &line_length, stdin);
server_addr.sin_addr.s_addr = inet_addr(line);
printf("###################\n\n");
int connectStatus = connect(listen_socket, (SA *) &server_addr, sizeof(server_addr)); //CONNECT
if (connectStatus < 0) why2_die("Connecting failed.");