Results 1 to 4 of 4

Thread: Internet chat program

  1. #1

    Thread Starter
    Addicted Member Daniel_Christie's Avatar
    Join Date
    Jan 2000
    Location
    USA
    Posts
    245
    Can anyone steer or provide any hady tips for creating a chat software via networking protocals such as TCP/IP.

    My friend and I want to create a software such as AIM and ICQ.
    Any help would be greatly appreciated.

    Daniel Christie

  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    240

    Try this for starting.

    I wanted to do the same as you but i just never finihsed the program:

    'This code will only send messages from a client form to the server form.

    Am sure you can figure out the details.


    'Client:

    Private Sub Command1_Click()
    Winsock1.Connect "127.0.0.1", 1134
    End Sub

    Private Sub Command2_Click()
    Dim Message As String
    Message = Text1.Text
    Winsock1.SendData Message
    Text1.Text = ""
    End Sub

    Private Sub Form_Load()

    End Sub

    Private Sub Winsock1_Connect()
    MsgBox "Yes!"
    End Sub

    Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
    If Winsock1.State <> sckConnected Then Winsock1.Close
    Winsock1.Accept requestID

    End Sub

    Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Dim Client As String
    Winsock1.GetData Client, vbString
    Text1.Text = Client
    End Sub


    'Server

    Private Sub Command1_Click()
    Winsock1.SendData Text1.Text
    Text1.Text = ""
    End Sub

    Private Sub Form_Load()
    Winsock1.LocalPort = 1134
    Winsock1.Listen
    End Sub

    Private Sub Winsock1_ConnectionRequest(ByVal requestID As Long)
    If Winsock1.State <> sckConnected Then Winsock1.Close
    Winsock1.Accept requestID

    End Sub

    Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
    Dim Message As String
    Winsock1.GetData Message, vbString
    Text1.Text = Message
    End Sub




  3. #3
    Fanatic Member gwdash's Avatar
    Join Date
    Aug 2000
    Location
    Minnesota
    Posts
    666
    Too Samples come to mind, one in vb help for winsock, is a winsock based one. The other is in the DirectX SDK and is more complex, but better. It uses DirectPlay.

    Hope this helps
    GWDASH
    [b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]

  4. #4
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    I have a winsock demo on my site: http://www.stevescyberhome.net

    the winsock control is really easy once you get the hang of it. If you want more help, email me.

    btw: the email in my signature is wrong

    [email protected]

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