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
Printable View
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
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
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
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]