Multiple Client to one Server Data sending.

Posted on 2003-02-21
Medium Priority
Last Modified: 2013-11-13
I'm building a client/server software similar setup to a chat program. If there are say, 20 Clients connected to this server all on the same port (say 55), how do I determine which client sent what data and which client to send data back to using winsock. I've been lookign up ConnectionRequest with the requestID and looking up DataArrival and SendData and GetData and I'm having a hard time finding an answer. Maybe I was looking in the wrong spot by not comming here. I like this message board.

Thanks in Advance
Question by:Lloydster
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

Expert Comment

ID: 8008227
When the Client connects to the server use the ip address to index each message from the client eg: Winsock1.RemoteHostIP


Author Comment

ID: 8008879
I understand what you're saying, and it makes sense, but how do I go about doing that?

Would it be something like this?

Private Sub cmdSend2Server1_Click()
Dim Data2Send

Data2Send = Text1.Text 'Data to send to say, server 1 with IP of

winsock1.RemoteHostIP =  ""
winsock1.SendData Data2Send

End Sub

Accepted Solution

wnaude earned 400 total points
ID: 8014883
have a look at this example by Randy Wable http://www.a1vbcode.com/app.asp?ID=1382
All data is logged with the source IP

This is a chat system developed using winsock control.

Try these projects they should have everything you looking for

Expert Comment

ID: 8901300
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
LVL 49

Expert Comment

ID: 8964090
Moderator, my recommended disposition is:

    Accept wnaude's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
This article will show, step by step, how to integrate R code into a R Sweave document
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
Suggested Courses

777 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