-
Hi!
I'm programming a chat program, but I'm having a few problems....
I want to send the text i submit in my chat to all other computers on the network running my
program.
How can i do that??
I have the following components on my form:
Msg (ListBox containing the messages posted to the chat)
Users (ListBox containing the users logged into the chat)
SendMsg (TextField where i type my message to be sent)
cmdSendMsg (Command button which i use to send the text in SendMsg to Msg)
-
-
ok, first thing do not worry about my english, i know it's bad, second thing i'v never done a chatting programm, but i remember i'v read some code explaining how to make a chat programm, and i remember if you using a winsock, you have to creat a number of winsocks which is the same number of the users, and the winsock gonna be in array, then all you have to do is to make loop which send the same information to all users, it would be some thing like that:
if we have 50 users and 50 winsocks then :
for i = o to 49
winsock(i).send("the message")
next i
,,,,,,,,
and finaly, i told ya i'v never done something like that, but if i want to do it, i would do it like this.