mirror of
https://github.com/sochix/TLSharp.git
synced 2026-04-05 14:37:04 +00:00
mereg from other branch
This commit is contained in:
parent
d86d7609e0
commit
7bca8302a3
5 changed files with 267 additions and 185 deletions
|
|
@ -19,10 +19,15 @@ namespace ClientConsoleApp
|
|||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
System.Threading.Thread.Sleep(2000);
|
||||
Thread.Sleep(2000);
|
||||
Console.WriteLine("Hello World!");
|
||||
|
||||
var client = GetTlgClient().Result;
|
||||
//var tcpClient = new TcpClient();
|
||||
//tcpClient.Connect(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 5000));
|
||||
//TestTcpClient(tcpClient);
|
||||
//TestTcpClient(tcpClient);
|
||||
|
||||
TelegramClient client = GetTlgClient().Result;
|
||||
var normalizedNumber = NumberToSendMessage.StartsWith("+") ?
|
||||
NumberToSendMessage.Substring(1, NumberToSendMessage.Length - 1) :
|
||||
NumberToSendMessage;
|
||||
|
|
@ -86,10 +91,8 @@ namespace ClientConsoleApp
|
|||
|
||||
}
|
||||
|
||||
private static void TestTcpClient()
|
||||
private static void TestTcpClient(TcpClient tcpClient)
|
||||
{
|
||||
var tcpClient = new TcpClient();
|
||||
tcpClient.Connect(new IPEndPoint(IPAddress.Parse("127.0.0.1"), 5000));
|
||||
if (tcpClient.Connected)
|
||||
{
|
||||
using (var memoryStream = new MemoryStream())
|
||||
|
|
@ -108,8 +111,7 @@ namespace ClientConsoleApp
|
|||
}
|
||||
}
|
||||
|
||||
System.Threading.Thread.Sleep(20000);
|
||||
|
||||
Thread.Sleep(5000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue