Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

one server, multi-client WinSock  Programming?

Posted on 1998-03-25
6
Medium Priority
?
386 Views
Last Modified: 2008-03-17
I am studying WinSock ..
I know one server, one client WinSock programming.
but I don't know  multi-client programming.
please HELP me !.
show me example source.
Thank you.
0
Comment
Question by:jhjeon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 5

Expert Comment

by:yonat
ID: 1257827
Doug Schmidt and Steve Vinoski did a series of srticles about this on The C++ Report. Check out his page at http://www.cs.wustl.edu/~schmidt/report-doc.html - read the titles starting with "Comparing Alternative Programming Techniques for Multi-threaded Servers". Each article comes with actual source code, and examines a different concurrency modle for writing a multi-client server.
0
 
LVL 4

Expert Comment

by:jtwine100697
ID: 1257828
  Generally, when you reject someone's answer, you explain your reason(s) why...

   But anyway...  Multiple Client programming just means that you accept (and process) more than one socket connection at one time.  You can maintain all connected sockets in an array/list, and just iterate the array/list to process and data to/from the socket.  That is the simplest way to do it.

   Getting into multiple-threaded servers is a bit more complex, and you are going to HAVE to read a book on it.  Too damn much code to post!

-=- James.
0
 

Author Comment

by:jhjeon
ID: 1257829
that answer is hard to me and it is wide ,complex in contents.
I want  simple examples.
and sorry yonat, thanks to help me.
 
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:jtwine100697
ID: 1257830
  Simple examples of what?  Of the array/list idea, or of Multithreaded servers (no "simple" examples there!)?

-=- James.
0
 
LVL 2

Accepted Solution

by:
seedy earned 300 total points
ID: 1257831
Please check this location for a Sample Winsock program:
   http://www.stardust.com/wsresource/winsock1/ws1code.html

This contains a Winsock1.1 sample code for a chat program
that accepts mulitple connections.  This is done thru MDI.
Each MDI child window handles one connection.  If you have
sufficient knowledge with windows programming you should be
able to modify this code to suit to your needs.
(Actually this sample code is server and client all rolled into
one program)
Hope this helps,
-Seedy-
0
 

Author Comment

by:jhjeon
ID: 1257832
thanks friends !!, have a nice day !
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand and use pointers in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question