Bè si...
Creare una chat in vb col winsock è semplicissimo...
ci sono molti sorgenti in giro...Vedi un pò!
Se hai bisogno di chiederci qualcosa siamo qui!
[b]Client[/b]
Private Sub Connetti_Click()
txtReply.Text = txtReply.Text & "Connessione in corso..."
txtReply.SelStart = Len(txtReply.Text)
wskClient.Close
wskClient.LocalPort = 0
wskClient.Connect txtHostName.Text, 2000
End Sub
Private Sub Invia_Click()
If wskClient.State <> sckConnected Then
txtReply.Text = txtReply.Text & "Non connesso"
txtReply.SelStart = Len(txtReply.Text)
Exit Sub
End If
wskClient.SendData txtOut.Text & vbCrLf
Private Sub wskClient_DataArrival(ByVal bytesTotal As Long)
Dim DATI As String
wskClient.GetData DATI
txtReply.Text = txtReply.Text & DATI & vbCrLf
txtReply.SelStart = Len(txtReply.Text)
End Sub
[b]Server[/b]
Private Sub Invia_Click()
If wskServer.State <> sckConnected Then
txtReply.Text = txtReply.Text & "Non connesso" & vbCrLf
txtReply.SelStart = Len(txtReply.Text)
Exit Sub
End If
wskServer.SendData txtOut.Text & vbCrLf
End Sub
Private Sub Listen_Click()
wskServer.Close
wskServer.LocalPort = 2000
wskServer.Listen
txtReply.Text = txtReply.Text & "Server in attesa..." & vbCrLf
txtReply.SelStart = Len(txtReply.Text)
End Sub
Private Sub wskServer_ConnectionRequest(ByVal requestID As Long)
If (wskServer.State <> sckClosed) Then wskServer.Close
wskServer.Accept requestID
txtReply.Text = txtReply.Text & "Connessione accettata..." & vbCrLf
txtReply.SelStart = Len(txtReply.Text)
End Sub
Private Sub wskServer_DataArrival(ByVal bytesTotal As Long)
Dim DATI As String
wskServer.GetData DATI
txtReply.Text = txtReply.Text & DATI & vbCrLf
txtReply.SelStart = Len(txtReply.Text)
End Sub
Mi hai fatto sudare
Se non hai capito qualcosa dimmelo!
ho trovato un programma, ma funziona sl x 2 persone cioè il server e un client, invece io volevo creare un chat ke comprendi almeno 50 utenti...io cm server e gli altri utenti...si può fare?
Se si mi aiutate?...un chat privata...io questo intendo...si può fare?...cosa devo inserire nelle form x iniziare?