Oppure

Loading
20/02/07 0:34
Vi prego, mi dite cosa c'è di sbagliato??

 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
01/08/08 8:54
ProgrMan93
tcp.Connect("mail.tin.it", 25)

Penso che lo sbaglio sia li al posto di "mail.tin.it" dovresti mettere l'indirizzo Ip dell' host
aaa