Sure i will help you out with this you need use the following code
HTML Code:
Imports System.Net.Sockets
Imports System.Reflection
Public NotInheritable Class ClientConnection
Implements IDisposable
Private Client As TcpClient
Private PublicIP As String
Public Sub New(ByVal client As TcpClient)
If client Is Nothing Then
Throw New ArgumentNullException("client")
End If
Me.Client = client
End Sub
#Region " IDisposable Support "
Private disposedValue As Boolean ' To detect redundant calls
Private Sub Dispose(ByVal disposing As Boolean)
If Not Me.disposedValue Then
If disposing Then
If Not Client Is Nothing Then
Client.Close()
Client = Nothing
End If
End If
End If
Me.disposedValue = True
End Sub
Public Sub Dispose() Implements IDisposable.Dispose
Dispose(True)
GC.SuppressFinalize(Me)
End Sub
#End Region
End Class
Bookmarks