Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
misc
exam.security
microsoft_update_catalog
msdn.annotations
msdn.drgui.discussion
msdn.duwamish
msdn.general
msdn.magazine
msdn.soaptoolkit
msdn.webservices
msdntraining
opsmgr.connectors
opsmgr.sp1
technet
technet.howtofeedback
technet.howtoneeds
technet.magazine
technet.technettalks
  
 
date: Thu, 19 Jun 2008 17:36:01 -0700,    group: microsoft.public.msdn.general        back       


Mixing input on sockets and stdin in Win32 Console Application   
I am writing a Win32 console application. The application is a socket client 
using winsock2 (WS2_32.lib). Most input comes from stdin, but I would like 
the application to receive unsolicited data on the socket. Is there a way to 
do this?

One web source http://beej.us/guide/bgnet/examples/select.c suggests that 
you can add stdin as one of the file descriptors passed to the select() 
statement. While that may work with BSD sockets, it fails with winsock2, 
generating the error WSAENOTSOCK (10038) Socket operation on non-socket. 

Any suggestions
date: Thu, 19 Jun 2008 17:36:01 -0700   author:   David

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us