10038 Error Socket
Contents |
Studio 2015 products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office socket error 10054 Word/Excel/PowerPoint Microsoft Graph Outlook OneDrive/Sharepoint Skype Services Store Cortana socket error 10057 Bing Application Insights Languages & platforms Xamarin ASP.NET C++ TypeScript .NET - VB, C#, F# socket error 10061 Server Windows Server SQL Server BizTalk Server SharePoint Dynamics Programs & communities Students Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Windows socket error 10038 socket operation on non socket Dev Center Windows Dev Center Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop
Socket Error 10035
Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Explore What’s new for Windows 10 Intro to Universal Windows Platform Coding challenges Develop for accessibility Build for enterprise Windows Store opportunities Docs Windows apps Get started Design and UI Develop API reference Publish Monetize Promote Games Get started UI design Develop Publish Desktop Get started Design Develop API reference Test and deploy Compatibility Windows IoT Microsoft Edge Windows Holographic Downloads Samples Support Why Windows Dashboard Networking and Internet Windows Sockets 2 Winsock Reference Winsock Reference Windows Sockets Error Codes Windows Sockets Error Codes Windows Sockets Error Codes Socket Options Winsock IOCTLs Winsock Annexes Winsock Enumerations Winsock Functions Winsock Structures and Typedefs Winsock Tracing Events Winsock SPI Windows Sockets Error Codes TOC Collapse the table of content Expand the table of content Th
One games Xbox 360 games PC
Socket Error 10053
games Windows games Windows phone games Entertainment All windows socket error 10038 Entertainment Movies & TV Music Business & Education Business Students & socket error 10038 delphi educators Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx 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 https://support.microsoft.com/en-us/kb/819124 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 http://stackoverflow.com/questions/30028754/10038-wsa-socket-error-recv 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 10038 wsa socket error recv up vote 1 down vote favorite I'm currently trying to implement a class to create and use TCP connections. (I'm quite new in c++ so it's possible that I forgot socket error something obvious, even though I've been seriously checking my code) Note that later I'll be implementing a second class to handle new connections so there are some parts of the code that are incomplete/arranged and I hope that this won't disturb you while trying to understand it. Here's my problem: The server and the client both seem to work fine (I'm always checking on my listen, bind, connect functions: no error) and I'm apparently able to send data with the client socket error 10038 but when I try to read it from the server, I get WSA error 10038 (which means that i'm executing the recv() on an invalid socket). I've been looking it up for a few days now and can't seem to find my mistake. Besides the tests in the code, I've used "netstat -an -p tcp" to check the state of the connection and everything appears fine but the server just won't receive the data. NB: I'm using Visual Studio 6 (Yup, it's old, but it's mandatory so...) and winsock, not winsock2. If I forgot something just ask, i'm trying to be as complete as possible but it's not impossible to forget something. Here are my source codes, i tried to cut it to the essential but i'm afraid that the mistake can be pretty much anywhere: CmTcpTransport.cpp /** Initializes the TCP connexion (socket) in CLIENT or SERVER mode. It does not connect yet. @param strIPAddress: IP Adress to reach nPort: Port to connect to hSocket: client Socket if SERVER mode nTcpMode: mode for this connexion SERVER(1) or CLIENT(2) @return an int to get the exit point of the function */ int CmTcpTransport::initialize(std::string strIPAddress, unsigned int nPort, SOCKET hSocket, int nTcpMode) { m_nTcpMode = nTcpMode; cout << "Creating TCP connexion..." << endl << endl; if (nTcpMode == 1) // SERVER { serveraddr.sin_family = AF_INET; // address family Internet serveraddr.sin_port = htons (nPort); // Port to connect on serveraddr.sin_addr.s_addr = inet_addr (strIPAddress.c_str()); //