Solved

one server, multi-client WinSock  Programming?

Posted on 1998-03-25
6
377 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
[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

 
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 100 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

Independent Software Vendors: 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

Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

636 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