Ok i have a pice of code, but when a client connect the server won't do anyhting. is there somthing wrong with my code?
Thanx in advance
Thanx in advance
Visual Basic:
Sub server_wait()
Do While server_process.ThreadState = Threading.ThreadState.Running
If client Is server_listener.AcceptTcpClient Then
client = server_listener.AcceptTcpClient()
data = Nothing
Dim stream As NetworkStream = client.GetStream()
Dim i As Int32
i = stream.Read(bytes, 0, bytes.Length)
While (i <> 0)
Dim sRetdate As String
data = System.Text.Encoding.ASCII.GetString(bytes, 0, i)
MsgBox(data)
Exit While
End While
End If
Loop
End Sub