as pino told me to do im posting this here

the problems are that my client wont send data or i might be to the server for everyone to see but the server isnt getting any of the info to display heres the send function of my code along with the data arrival of the server which is the same as the code for client


VB Code:
  1. Private Sub cmdsend_Click()
  2. For i = 0 To server.ubound - 1
  3.         If client(i).State = sckConnected Then
  4. client(i).SendData txtnickname.Text & ": " & txtmsg.Text
  5.         End If
  6.    DoEvents
  7. Next i
  8. txtchat.Text = txtchat.Text & txtnickname.Text & ": " & txtmsg.Text & vbNewLine
  9. txtmsg.Text = ""
  10. End Sub


VB Code:
  1. Private Sub winsock_DataArrival(ByVal bytesTotal As Long)
  2. client(i).GetData msgarrived, vbString
  3. txtchat.Text = txtchat.Text & msgarrived & vbNewLine
  4. End Sub