add reading server greeting message
This commit is contained in:
@@ -123,12 +123,23 @@ namespace f_cln
|
||||
await client.ConnectAsync(ip, port);
|
||||
|
||||
Console.WriteLine("Подключено к серверу");
|
||||
Console.WriteLine("Введите текст для отправки (или 'exit' для выхода):");
|
||||
|
||||
using var stream = client.GetStream();
|
||||
using var reader = new StreamReader(stream, Encoding.UTF8);
|
||||
using var writer = new StreamWriter(stream, Encoding.UTF8) { AutoFlush = true };
|
||||
|
||||
{
|
||||
string? hello = reader.ReadLine();
|
||||
if (hello != null && hello.Length > 6)
|
||||
{
|
||||
hello = hello.Remove(0, 6);
|
||||
// hello = hello.Replace("hello ", "");
|
||||
Console.WriteLine($"Локальный адрес: {hello}");
|
||||
}
|
||||
}
|
||||
|
||||
Console.WriteLine("Введите текст для отправки (или 'exit' для выхода):");
|
||||
|
||||
while (true)
|
||||
{
|
||||
// Чтение ввода пользователя
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"profiles": {
|
||||
"f-cln": {
|
||||
"commandName": "Project",
|
||||
"commandLineArgs": "-p 1771"
|
||||
"commandLineArgs": "--port 1771 -i fe80::215:5dff:fe12:ec9"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
"profiles": {
|
||||
"f-srv": {
|
||||
"commandName": "Project",
|
||||
"commandLineArgs": "--port 3113 -i 192.168.15.128"
|
||||
"commandLineArgs": "--port 1771 -i 127.0.1.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user