20/02/07 0:34
Vi prego, mi dite cosa c'è di sbagliato??
il mio client riesce soltanto a connettersi all'host; non riceve e non manda. ma nn ho capito il motivo!! il codice mi sembra così pultio
x favore aiutatemi
Public tcp As New TcpClient Public netstream As NetworkStream Public tcpthread As Thread Public Sub Connetti() tcp.Connect("mail.tin.it", 25) netstream = tcp.GetStream tcpthread = New Thread(AddressOf Leggo) tcpthread.Start() End Sub Public Sub Leggo() While True Try Dim bytes As Byte() netstream.Read(bytes, 0, 100) Dim testo As String = Encoding.ASCII.GetString(bytes) eLog.Text += testo & vbCrLf Catch e As Exception End Try End While End Sub Public Sub Scrivo(ByVal testo As String) Try eLog.Text += eSend.Text & vbCrLf Dim stringa As Byte() = Encoding.ASCII.GetBytes(testo) netstream.Write(stringa, 0, stringa.Length) Catch e As Exception End Try End Sub
il mio client riesce soltanto a connettersi all'host; non riceve e non manda. ma nn ho capito il motivo!! il codice mi sembra così pultio
x favore aiutatemi