Results 1 to 3 of 3

Thread: Chat

  1. #1

    Thread Starter
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    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)

    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Location
    Rochester NY, USA
    Posts
    93

  3. #3
    Addicted Member Mih_Flyer's Avatar
    Join Date
    Mar 2000
    Location
    some place there
    Posts
    241
    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.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width