TLSharp icon indicating copy to clipboard operation
TLSharp copied to clipboard

TlSharp I haven't done anything yet, but Client.ConnectAsync is an error

Open jianwei923 opened this issue 4 years ago • 1 comments

public async static void Init() { var client = new TelegramClient(123456, "aaabbbbbbccccccc"); await client.ConnectAsync(); }

Error:Unable to write data to the transport connection: The remote host forced closure of an existing connection

jianwei923 avatar Apr 18 '21 18:04 jianwei923

Your network is probably hostile toward telegram tcp traffic. We have a WIP commit here that changes the transport layer to websocket that might help you but It can't be said for certain because countries like Iran for example, actively drop any connection to telegram servers.

aarani avatar May 12 '21 21:05 aarani