10038 Windows Socket Error
Contents |
One games Xbox 360 games PC windows socket error 10038 ftp games Windows games Windows phone games Entertainment All
Socket Error 10038 Delphi
Entertainment Movies & TV Music Business & Education Business Students & socket error code 10038 educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security winsock 10038 Internet Explorer Microsoft Edge Skype OneNote OneDrive Microsoft Health MSN Bing Microsoft Groove Microsoft Movies & TV Devices & Xbox All Microsoft devices Microsoft Surface All Windows PCs & tablets PC accessories Xbox & games Microsoft Band Microsoft
Socket Error Codes Linux
Lumia All Windows phones Microsoft HoloLens For business Cloud Platform Microsoft Azure Microsoft Dynamics Windows for business Office for business Skype for business Surface for business Enterprise solutions Small business solutions Find a solutions provider Volume Licensing For developers & IT pros Develop Windows apps Microsoft Azure MSDN TechNet Visual Studio For students & educators Office for students OneNote in classroom Shop PCs & tablets perfect for students Microsoft in Education Support Sign in Cart Cart Javascript is disabled Please enable javascript and refresh the page Cookies are disabled Please enable cookies and refresh the page CV: {{ getCv() }} English (United States) Terms of use Privacy & cookies Trademarks © 2016 Microsoft
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with what is a socket error us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow socket error 10054 connection reset by peer Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up
Socket Error 10053
10038 socket error up vote 3 down vote favorite 1 Is there any solution for 10038 server error .i have done coding in c++; the server runs fine 10 to 12 hours but sudenly it gives 10038 socket error c++ visual-c++ sockets https://support.microsoft.com/en-us/kb/819124 share|improve this question edited Oct 16 '10 at 9:00 asked Oct 16 '10 at 8:32 SunilRai86 34231025 add a comment| 3 Answers 3 active oldest votes up vote 6 down vote Without seeing your code: the symptom you describe sounds like you are leaking memory/resources, i.e. you are forgetting to free/delete objects you are allocating. It could also be a timing issue. I suggest you post your (cut-down) code. 10038 (WSAENOTSOCK): Socket operation on nonsocket. An operation was attempted on something that is not a http://stackoverflow.com/questions/3948164/10038-socket-error socket. Either the socket handle parameter did not reference a valid socket, or for select, a member of an fd_set was not valid. share|improve this answer answered Oct 16 '10 at 8:34 Mitch Wheat 214k28345442 1 downvoters please leave a comment. –Mitch Wheat Jan 30 at 0:00 Can you explain the cryptic: "An operation was attempted on something that is not a socket" –Silvester Aug 11 at 8:53 add a comment| up vote 6 down vote I bet you are accessing a socket that you already closed. This is a very common timing bug in WinSock programming - the good news (and bad news, because it's hard to reproduce) is that you are not hitting it very often so it's likely your code does not need much work to make it perfect. I think you should add thread-safe diagnostics that output a string including the socket value (an int, basically) on every open and close, and from anywhere you see this 10038 or other unexpected errors. If you can add those diagnostics and then set up a stress test that focuses on open and close areas in your program (you may need to strip down the code to a small subset for unit testing of the sockets handling, maybe doing this back-to-back on localhost, or to two LAN-connected machines) then it will likely manifest much more quickly than 10-12 hours and you may find and fix other timing windows along the way. The goal is to try
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss http://stackoverflow.com/questions/577780/send-returns-winsock-error-10038 the workings and policies of this site About Us Learn more about http://stackoverflow.com/questions/2891865/bind-fails-with-windows-socket-error-10038 Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. socket error Join them; it only takes a minute: Sign up send(), returns Winsock Error 10038 up vote 0 down vote favorite Problem: Call to send(), returns Winsock Error 10038 against socket handle Illustration: acceptedSocket = accept (server, (sockaddr *)&sin, &len); accept(), returns 0 A new thread, is created for each connection send(), (in thread function) returns 10038 Illustration: - windows socket error in thread function //omitted SOCKET RemoteSocket = (SOCKET) client; //omitted send (RemoteSocket, stringToSpend, strlen(stringToSpend), 0) Suggestions: Possible, race condition? Could use I/O completion ports, but not at this stage c++ windows visual-studio-2008 multithreading winsock share|improve this question edited Feb 23 '09 at 15:00 asked Feb 23 '09 at 14:23 Aaron 1,36253252 add a comment| 3 Answers 3 active oldest votes up vote 2 down vote accepted Isn't the problem in the line acceptedSocket = accept (server, (sockaddr *)&sin, &len) == INVALID_SOCKET) You make acceptedSocket the result of the comparison, but you should store the actual socket returned from accept somehow: acceptedSocket = accept (server, (sockaddr *)&sin, &len); isOK= acceptedSocket!=INVALID_SOCKET; Although I'm a bit confused by the unbalanced parentheses in your post, so I may be wrong share|improve this answer answered Feb 23 '09 at 14:52 jpalecek 36.5k365112 add a comment| up vote 2 down vote accept() returns you a handle to a new connection-specific socket. for server code it's 2+ sockets involved: one is in listen state you are calling accept() for and
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up bind() fails with windows socket error 10038 up vote -1 down vote favorite I'm trying to write a simple program that will receive a string of max 20 characters and print that string to the screen. The code compiles, but I get a bind() failed: 10038. After looking up the error number on msdn (socket operation on nonsocket), I changed some code from int sock; to SOCKET sock which shouldn't make a difference, but one never knows. Here's the code: #include