home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.protocols.tcp-ip      TCP and IP network protocols.      14,669 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 13,884 of 14,669   
   Test to All   
   Muliple users in a Windows server   
   25 Sep 12 13:39:29   
   
   From: test@.nil.invalid.com   
      
   I am wring a small http server which is using the Microsoft Windows WinSock   
   API.   
      
   Do I need to apply multithreaded logic when handling multiple users?   
      
   Currently Windows sends a message when there is a network event and each   
   message   
   carried (in wParam) the socket to be used in either send() or recv().   
      
   When client A connects and requests a coupel of files usually a number of   
   socket   
   are created by Winsock. My server then get a message that "send this file to   
   socket 123" and later "send that file to socket 456"   
      
   What another client connect it too gets a few sockets, say 789 and 654.   
      
   My server then respond to requests to send data using supplied socket number.   
   It   
   does not have to know who wants the file since the correct file has to be sent   
   to   
   the right socket.   
      
   I do not know whether Windows itself uses multiple threads when handling   
   accepting connection and sending the message dow to my program.   
      
   So my question is:   
   Do I need to apply multithreaded logic when handling multiple users? And if so   
   at   
   what point should I create a thread?   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca