Most voted "tcpclient" questions
20 questions
Sort by count of
-
3
votes3
answers401
viewsSQLSERVER error in C#application
I have a problem related to the SQLSERVER database. I try to connect from a point to the server and error appears: Instance-specific or network error when connecting to SQL Server. The server was…
-
3
votes1
answer94
viewsHow to find out if TCP Listener is listening?
Library that I use: https://github.com/rdavisau/sockets-for-pcl Follows code: await client.ConnectAsync(address, port); The code above is the client and works normal. Let’s say the server is off,…
-
2
votes1
answer293
viewsWhat if I want to send and receive a "package"?
I put a mini server test online and everything worked out, the problem is that I want to send integers, booleans, strings, etc... So far I only know how to send string, how to take the first steps?…
-
2
votes1
answer31
viewsSocket.Beginsend Using a lot cpu
I have an online game server and have 600 online users, but the cpu is a little high (using 10~20% of 26GHz) and the profiler says that this line is using a lot of resources Socket.BeginSend(packet,…
-
2
votes1
answer756
views -
2
votes1
answer257
viewsError trying asynchronous connection
I’m trying to do this way not to crash the application while waiting for the server to accept the connection. I saw that you can do with async and the await. But while trying to use them to wait for…
-
2
votes1
answer501
viewsBidirectional Communication - Send and Receive string value correctly
Follows code from server: int port = 11000/*PortGranter.GrantPort()*/; TcpSocketListener listener = new TcpSocketListener(); var tcs = new TaskCompletionSource<ITcpSocketClient>(); await…
-
1
votes1
answer1192
viewsHow to encrypt and decrypt data to be transmitted via sockets?
I have a program that logs in with my server, however the connection is without any protection. I looked for some ways to protect but it seems that some of them have a pass code on the client, but I…
-
1
votes1
answer722
viewsDns.Resolve() vs Dns.Gethostentry()
The method Resolve is as obsolete and Microsoft guides to use the GetHostEntry. However when using GetHostEntry the exception occurs: This host is not known When I use Resolve there is no exception…
-
1
votes0
answers32
viewsTCP/IP communication with Markem9030 printer
Good afternoon, you guys, I have a program in c# that opens a socket connection using TCP/IP and writes some data... when reading the answers it receives a few bytes that when converting to HEX it…
tcpclientasked 7 years, 7 months ago Manuel Rodrigues 11 -
1
votes0
answers139
viewsClient chat It is not possible to read data from the transport link:
Hello everyone is the following I made a Tc Pque server I already concluded, in the last days I have been doing the client but is giving the following error Cannot read data from transport link: A…
-
1
votes1
answer68
viewsTcpclient only receives the first message while connected
I’m developing a program for hobby, in order to understand how the TcpClient. Well, I am doing a program that from time to time receives a package from a secondary program and sends an OK back,…
-
1
votes1
answer70
viewsHow to control events in C#
Using the "Tcplistener" class I am "listening" to a port where several customers will connect. Until then quiet. To receive data from a client I used a Thread that generates an event whenever some…
-
1
votes1
answer133
viewsreverse connection in C#
I’m having a hard time using a reverse connection between client and server. Whenever I try to connect using Dns or Ip does not connect, if I use Localhost, 127.0.0.1, it connects perfectly. It can…
-
1
votes1
answer108
viewsHow to check if client disconnected abruptly
I have this online chat code using socket and TCPListener, but when the client simply disconnects abruptly or loses connection, it is not removed from the ArrayList so-called clients. public void…
-
0
votes0
answers110
viewsProblem to establish a connection between Client.exe and Server.exe using No-ip service
I have a remote access app and needed to receive connections from my customers using the service No-ip (no-ip.com), in view of the fact that ip external is always dynamic. So I have already made all…
-
0
votes1
answer563
viewsUnable to read data from the transport Connection: Connection reset by peer
Follows the code: here. Customer code is receiving an exception: Unable to read data from the transport Connection: Connection reset by peer. Why this error? And how can I correct ?…
-
0
votes1
answer128
viewsTcpclient C# Windows Form how to close and open the same connection
I am developing a Windows Form C# application and I am using Tcpclient to carry out communication within my internal network, in some moments I need to close an existing connection and after a few…
-
0
votes1
answer47
viewsHow to receive 2 thread response and store in one method?
The problem is this: I have a server that receives 2 players (each in a thread) using TCP/IP. In the run of each thread they inform the move (stone, paper or scissors). I have a class "Play", which…
-
-1
votes1
answer1040
viewsThe server responds with the RST/ACK flag after the client sends the SYN flag
I have been understanding why the X server responds to the TCP request of the Y client with the RST/ACK flag. I think the problem may be one of the 3 below. The port on the server side is closed; A…