tcpclient
How do I use the .NET NetworkStream and TcpClient to connect to a remote IP and wait for data?
I am struggling a lot with this code I am trying to get to work.I have successfully made a connection with the TcpClient object to two separate remote machines and transmitted data to them.Essentially[详细]
2023-04-13 02:08 分类:问答Why does waiting on this Task for 1022 milliseconds work fine but 1023 causes an AggregateException?
Trying to implement a timeout parameter for connecting to a server but I\'m not having much luck. Here\'s my code:[详细]
2023-04-12 04:20 分类:问答Can I get TCP/IP packet before it was sent?
There is a client and a server applications running on the same machine. They use asynchronous communication with TcpClient and TcpListener.[详细]
2023-04-11 21:25 分类:问答Reliably reconnect to the server TCPClient C#
I am having trouble reconnecting a TCPClient 开发者_StackOverflow(actual class name from C#) to its server. Is there a well defined way of doing this? Do I need to manage the tcp connection at the ser[详细]
2023-04-11 20:09 分类:问答Configure socket ACK timeout?
Is there a way to configure the timeout in which a socket expects to receive an ACK for sent data before it decides that the connection has failed?[详细]
2023-04-11 14:43 分类:问答C# networking TcpClient
Can someone tell me why \"Went Through?\" gets printed only when argument to Thread.Sleep is < 110?[详细]
2023-04-11 06:24 分类:问答What conditions cause NetworkStream.Write to block?
Will NetworkStream.Write block only until it places the data to be sent into the TCP send buffer, or will it block until the data is actually A开发者_运维技巧CK\'d by the receiving host?[详细]
2023-04-10 18:44 分类:问答Does one need to close both NetworkStream and TcpClient, or just TcpClient?
I\'m reading the documentation on TcpClient.Close() and noticed this: Calling this method will eventually result in the close of the associated Socket and will also close the associated NetworkStrea[详细]
2023-04-10 11:23 分类:问答How to restart a task elegantly?
So I have something like this: Task.Factory.FromAsync<TcpClient>(tcpListener.BeginAcceptTcpClient, tcpListener.EndAcceptTcpClient, tcpListener).ContinueWith(ConnectionAccepted);[详细]
2023-04-10 01:41 分类:问答Does Task.Factory.FromAsync(BeginRead, EndRead) read the entire data block before completing?
In my code right now I have something like this: state.BytesRead += readPacket.Result; if (state.BytesRead < state.Data.Length)[详细]
2023-04-09 20:06 分类:问答