473,811 Members | 2,749 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WinSock Error (Error code: 10054)

SK
Hi all,

I am dealing with sockets in my code.

I open them like -
System.Net.IPAd dress remoteIPAddress = System.Net.IPAd dress.Parse
(szIPSelected);
System.Net.IPEn dPoint remoteEndPoint = new System.Net.IPEn dPoint
(remoteIPAddres s, alPort);
// Connect to the remote End point in the socket.
m_socClient.Con nect(remoteEndP oint);

After having done my work I close it by-
m_socClient.Shu tdown(SocketShu tdown.Both);
m_socClient.Clo se();

I get an error "An existing connection was forcibly closed by the remote host
Error code: 10054" after running the application several times.
Am I missing on something?

Best regards,
SK
Nov 15 '05 #1
3 10217

This is normal error, what you must skip or handle.

This happens when computer you are connected to closes connection(with out
ShutDown).
"SK" <sk@hotmail.com > wrote in message
news:<Ou******* *******@tk2msft ngp13.phx.gbl>. ..
Hi all,

I am dealing with sockets in my code.

I open them like -
System.Net.IPAd dress remoteIPAddress = System.Net.IPAd dress.Parse
(szIPSelected);
System.Net.IPEn dPoint remoteEndPoint = new System.Net.IPEn dPoint
(remoteIPAddres s, alPort);
// Connect to the remote End point in the socket.
m_socClient.Con nect(remoteEndP oint);

After having done my work I close it by-
m_socClient.Shu tdown(SocketShu tdown.Both);
m_socClient.Clo se();

I get an error "An existing connection was forcibly closed by the remote host Error code: 10054" after running the application several times.
Am I missing on something?

Best regards,
SK

Nov 15 '05 #2
SK
So does that mean that I am bound to get such errors when opening/closing
sockets many times.
So is simply ignoring these error messages fine?
I was thinking that I made some mistake in closing the sockets.

Best regards,
SK

"Ivar" <iv**@lumisoft. ee> wrote in message
news:#f******** ******@tk2msftn gp13.phx.gbl...

This is normal error, what you must skip or handle.

This happens when computer you are connected to closes connection(with out
ShutDown).
"SK" <sk@hotmail.com > wrote in message
news:<Ou******* *******@tk2msft ngp13.phx.gbl>. ..
Hi all,

I am dealing with sockets in my code.

I open them like -
System.Net.IPAd dress remoteIPAddress = System.Net.IPAd dress.Parse
(szIPSelected);
System.Net.IPEn dPoint remoteEndPoint = new System.Net.IPEn dPoint
(remoteIPAddres s, alPort);
// Connect to the remote End point in the socket.
m_socClient.Con nect(remoteEndP oint);

After having done my work I close it by-
m_socClient.Shu tdown(SocketShu tdown.Both);
m_socClient.Clo se();

I get an error "An existing connection was forcibly closed by the remote

host
Error code: 10054" after running the application several times.
Am I missing on something?

Best regards,
SK


Nov 15 '05 #3
So is simply ignoring these error messages fine? Usually yes, but it depends if you want notify your app that remote computer
closed connection.
I was thinking that I made some mistake in closing the sockets. I'm sure that your destination machine(server) causes this. If you send
Shutdown() then server won't
close connection as expected, it just closes it (No shutdown).

"SK" <sk@hotmail.com > wrote in message
news:<um******* *******@TK2MSFT NGP12.phx.gbl>. .. So does that mean that I am bound to get such errors when opening/closing
sockets many times.
So is simply ignoring these error messages fine?
I was thinking that I made some mistake in closing the sockets.

Best regards,
SK

"Ivar" <iv**@lumisoft. ee> wrote in message
news:#f******** ******@tk2msftn gp13.phx.gbl...

This is normal error, what you must skip or handle.

This happens when computer you are connected to closes connection(with out ShutDown).
"SK" <sk@hotmail.com > wrote in message
news:<Ou******* *******@tk2msft ngp13.phx.gbl>. ..
Hi all,

I am dealing with sockets in my code.

I open them like -
System.Net.IPAd dress remoteIPAddress = System.Net.IPAd dress.Parse
(szIPSelected);
System.Net.IPEn dPoint remoteEndPoint = new System.Net.IPEn dPoint
(remoteIPAddres s, alPort);
// Connect to the remote End point in the socket.
m_socClient.Con nect(remoteEndP oint);

After having done my work I close it by-
m_socClient.Shu tdown(SocketShu tdown.Both);
m_socClient.Clo se();

I get an error "An existing connection was forcibly closed by the
remote host
Error code: 10054" after running the application several times.
Am I missing on something?

Best regards,
SK



Nov 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
9344
by: Ophir | last post by:
Hello all ! I wrote a simple ActiveX DLL to wrap winsock functionality so I can use it in an ASP page. I call it MyWinSock In the Class module I use this declaration: Dim ctlSocket as Variant.
1
31239
by: Dom | last post by:
I'm new to c++. Just started learning it 24 hours ago. Am running into a compile problem. Please, no one waste the effort telling me to google it. I've been researching it for quite a while with no joy. I got dev-c++ and a bit of winsock sample code. I've done nothing out of the ordinary. I could only assume that anyone else that downloaded this software and attempted this would meet with the same result. The problem lies with either the...
7
2856
by: Nadav | last post by:
Hi I am writing some kind of a storage system that have to deal with large amounts of data passing over the net, Now, I Wonder... traditional programming would use win32 Winsock DLL as the means of data transportation... now, indigo is the new communication layer of the CLR, - Does indigo uses Winsock internally? - Is it possible to use indigo for such a task? - I assume using indigo has it's performance penalty ( doesn't it ? - Does...
1
3817
by: Glen Conway | last post by:
Hi, I'm trying to use the gethostbyname function from wsock32.dll and failing dismally Has anyone got a successful implementation of this in VB.NET? My ulitimate goal is to resolve NetBIOS names to IP Addresses. I can use the framework DNS features if a DNS server is present on the network but this cannot use WINS if no DNS server is available. Any help or pointers are apprecatiated. Here is the code I've managed to do so far. I've...
1
5438
by: Nicolas Ghesquiere | last post by:
Hello I have a problem with my current program. The meaning of the program is to allow users to login to a server to allow them to access the internet. My program communicates with a MS isa server to make a rule for that IP for the time-credits left for that user. My problem is that so far, the program can handle everything except more then one client, and i have done my best, but i can't find a decent solution
0
2073
by: imonline | last post by:
Hi, I have created a asp.net page which posts XML on the web service using .net 2.0. The page and the webservice was working fine but once I converted them to .net 3.5 I have been getting following exception. And I am having this problem on the local machine that is both of them on same machine. Exception: System.Net.WebException was caught
3
16123
osfreak
by: osfreak | last post by:
i have a client,server application... I have made the server to listen and accept a connection. The client also connects successfully The connection works good except that i get the WSAECONNRESET error at times. server works as { recv send }
4
5732
by: imaloner | last post by:
I am posting two threads because I have two different problems, but both have the same background information. Common Background Information: I am trying to rebuild code for a working, commercially sold application with only partial build instructions. The previous maintainer of the code (a mixture of C and C++) is no longer with the company, but when he built the code he used MSVC++, and though I am not certain of the version he was ...
3
7624
AaronL
by: AaronL | last post by:
Hello, I am currently working on a project that has me in sort of a bind. What I want to do is retrieve web pages from the internet, and strip them down to just text. I'll get using Regular Expressions to strip out the HTML code itself, the problem is actually getting the web pages from the internet. I tried using the Microsoft Internet Transfer Control but my client was experiencing problems with some web pages not downloading, this...
0
9727
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10647
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10133
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4339
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.