Error 10038 Socket
Contents |
Studio 2015 products Visual Studio Team Services Visual Studio Code Visual Studio Dev Essentials Office Office Word/Excel/PowerPoint Microsoft Graph Outlook OneDrive/Sharepoint Skype Services socket error 10054 Store Cortana Bing Application Insights Languages & platforms Xamarin ASP.NET C++
Socket Error 10057
TypeScript .NET - VB, C#, F# Server Windows Server SQL Server BizTalk Server SharePoint Dynamics Programs & socket error 10061 communities Students Startups Forums MSDN Subscriber downloads Sign in Search Microsoft Search Windows Dev Center Windows Dev Center Explore What’s new for Windows 10 Intro to Universal
Socket Error 10038 Socket Operation On Non Socket
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 socket error 10035 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 This documentation is archived and is not being maintained. This documentation is archived and is not being maintained. Windows Sockets Error Codes Most Windows Sockets 2 functions do not return the specific cause of an error when the function returns. For information, se
360 games PC games
Socket Error 10053
Windows games Windows phone games Entertainment All Entertainment
Socket Error Code 10038
Movies & TV Music Business & Education Business Students & educators socket error codes linux Developers Sale Sale Find a store Gift cards Products Software & services Windows Office Free downloads & security Internet https://msdn.microsoft.com/en-us/library/windows/desktop/ms740668(v=vs.85).aspx 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 Lumia All https://support.microsoft.com/en-us/kb/819124 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 http://stackoverflow.com/questions/15504016/c-winsock-socket-error-10038-wsaenotsock 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 C++ Winsock Socket Error: 10038 (WSAENOTSOCK) up vote 4 down vote favorite 1 I socket error have an master slave application Master running on WinXp(i7, 2.1 Ghz) and slave being a controller board. The master sends request to the slave and the slave in response send to the master the data cyclically. This data send cyclically by the slave is 1000 bytes per 0.5 msec. When the masters makes the request to send the data, on the console an error is reported. " Select() function error code:: error 10038 socket 10038 ". This is the code for WSAENOTSOCK. This application is a single threaded application receiving the data from the slave. As from the error it seems that the socket is closed before it is checked by the select function. Can any one please point me in the direction ? :::Source Code:::: int Receive() { int rc; socklen_t cli_alen; struct timeval to; fd_set read_fd, write_fd, excep_fd; FD_ZERO(&write_fd); FD_ZERO(&excep_fd); sock_again: if (!_isSocketOpen) { return 0; } FD_ZERO(&read_fd); FD_SET(_sock_fd, &read_fd); to.tv_sec = 0; to.tv_usec = 0; cli_alen = sizeof(SOCKADDR_IN); rc = select(_sock_fd+1, &read_fd, &write_fd, &excep_fd, &to); if (rc == 0 ) { // Timeout // printf("XCP Port %d : select() timded out \n", _port); acess = 1; goto sock_again; } else if (rc == SOCKET_ERROR) { // Error LogError("XCP: select() error %d", WSAGetLastError()); closesocket(_sock_fd); return -1; } else { // Data if (!FD_ISSET(_sock_fd, &read_fd)) { LogError("XCP: select() wrong socket descr"); return -1; } else { //read data rc = recvfrom(_sock_fd, (char *)_recvBuf, UDP_RECVBUFLEN, 0, (LPSOCKADDR)&_saddr, &cli_alen); } } } :::: Edited :::: int CloseUdpConnection() { if (closesocket(_sock_fd) == SOCKET_ERROR) { LogError("closesocket() error: %d", WSAGetLastError()); return -1; } _isSocketOpen = 0; LogError("successfully closed socket %s:%d", _address, _port); return 0; } ::::: Debug Trace ::::: xcpApplication.exe -i 192.168.1.100 -p 5555 c --> Connecting