J'ai un message d'erreur :
"Une seule utilisation de chaque adresse de socket (protocole/adresse réseau/port)
est habituellement autorisée."Mon application possède deux forms, qui se "Form.SHOW" et se "Me.CLOSE" avec :
FormLoad = Dim tcpClientConnect As TcpClient
Dim port As Int32 = 23
Dim localAddr As IPAddress = IPAddress.Any '.Parse("10.50.11.3")
Dim TcpServer As New TcpListener(localAddr, port)
Dim stream As NetworkStream
Private trd1 As New Thread(AddressOf ThreadConn) 'New thread
Private trd2 As New Thread(AddressOf ThreadData) 'New thread
Dim Thrdata As [String] = Nothing 'New thread
Dim Thrconn As [String] = Nothing 'New thread
TcpServer.Start()
If trd1.ThreadState <> ThreadState.Running Then
Threading.Thread.Sleep(1000)
trd1.IsBackground = True
trd1.Start()
End If
Des idées, pour éviter cela ?
Merci,
Marco