Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Read(ByVal ar As IAsyncResult)
- On Error Resume Next
- If TCP.GetStream.DataAvailable And TCP.GetStream.CanRead Then
- Dim tt As New Thread(AddressOf Data) : tt.IsBackground = True : tt.SetApartmentState(ApartmentState.STA) : tt.Start(DirectCast(bf.Deserialize(TCP.GetStream), Byte()))
- TCP.GetStream.Flush() : TCP.GetStream.BeginRead(New Byte() {0}, 0, 0, AddressOf Read, Nothing)
- Exit Sub
- Else
- GoTo r
- End If
- r:
- Disconnect()
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement