Ivan Shynkarenka

Results 148 comments of Ivan Shynkarenka

_receiveBuffer does not require locking, it should not be used in multithread. Please check the whole cycle: ``` ReceiveAsync() -> TryReceive() -> Socket.ReceiveAsync() -> OnAsyncCompleted() -> ProcessReceive() -> OnReceived() ->...

In sync mode you should call only sync methods - Connect(), Disconnect(), Send(), Receive(). I suggest use sync scenarios only for TCP/SSL client. For server I suggest considering async processing....

`TcpServer.Start()` will start socket accepting and will call TcpSession.TryReceive() automatically for each connected session.

`Iocp will callback with a random thread in threadpool in theory(also i have tested it).So I still think there will be some problem here.` Yes receiving loop will be called...

Each session and client has unique Id property with Guid type. You can access to all connected sessions in server using Sessions property or handle them in your own server...

For WebSockets protocol you need to call SendText()/SendTextAsync()/SendBinary()/SendBinaryAsync() methods

Try `(ChatSession)session`

For .NET 3.5 please choose NetCore-3.0 branch ![image](https://user-images.githubusercontent.com/4397805/129242355-e2fa79cb-18e5-40bd-9206-77e590131a02.png)

Please see my examples of [Simple protocol server](https://github.com/chronoxor/NetCoreServer#example-simple-protocol-server) and [Simple protocol client](https://github.com/chronoxor/NetCoreServer#example-simple-protocol-client). They are very close to what you're trying to implement for Request/Response server/client.

For ws:// default port is 80 For wss:// default port is 443 Please try ``` new WssClient(context, Dns.GetHostAddresses("customserver.com").FirstOrDefault(), 443) ```