3 Replies - 1604 Views - Last Post: 22 March 2009 - 04:36 PM Rate Topic: -----

#1 Ricendithas  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 59
  • Joined: 12-July 08

Suggestions for Personal Message using Winsock

Posted 22 March 2009 - 12:26 AM

Hi, I have created a chat program with a server and clients. It worked well, however, the problem is, whatever you type in and send to the server will be sent to all connected clients. So I was wondering if what can you suggest so that a client can send a personal message to another client and will not be sent to other connected clients.

Thank you in advance. =)
Is This A Good Question/Topic? 0
  • +

Replies To: Suggestions for Personal Message using Winsock

#2 vb5prgrmr  Icon User is offline

  • D.I.C Lover

Reputation: 109
  • View blog
  • Posts: 1,016
  • Joined: 21-March 09

Re: Suggestions for Personal Message using Winsock

Posted 22 March 2009 - 01:52 AM

Request from server IP/ID for user X.
send to server with modified header info that tells server that this is not public message and that server needs only to send/forward the message to user X. Send/Recieve app then sees modified header and alerts user to PM and PM contents.

OR

Request from server IP/ID for user X.
Send/Recieve program then uses IP for PM.
Send/Recieve program notices that message recieved is not from server but from someone else and then notifies user of PM and contents.
With this you may need to dynamically open ports for multiple PM chat sessions not quite sure but I do know there is a slew of code out there that you can find via a search on yahoo/google or perhaps http://www.planet-source-code.com

Good Luck
Was This Post Helpful? 0
  • +
  • -

#3 Zhalix  Icon User is offline

  • D.I.C Regular

Reputation: 20
  • View blog
  • Posts: 260
  • Joined: 07-May 08

Re: Suggestions for Personal Message using Winsock

Posted 22 March 2009 - 04:37 AM

Please show us the code you're using to send messages to the clients.
Was This Post Helpful? 0
  • +
  • -

#4 Raju2047  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 6
  • View blog
  • Posts: 55
  • Joined: 16-February 09

Re: Suggestions for Personal Message using Winsock

Posted 22 March 2009 - 04:36 PM

Hope It will help.

http://www.sourcecod...controller.html

I have made this program in vb6. It's also all about using winsock.
I have tried to use all the code related winsock.
You can read this and send me the feedback. You can aslo ask me if you do not understand any code.
I 'll always be there to help you.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1