Dim bytesfile() As Byte = IO.File.ReadAllBytes("E:\String1.txt") '1.jpg
SendData(bytesfile, ListBox1.SelectedItems(0).Tag)
'---send the data to the client---
Public Sub SendData(ByVal data As Byte(), ByVal client As Socket)
Try
client.BeginSend(data, 0, data.Length, SocketFlags.None, New AsyncCallback(AddressOf onsend), client)
Catch ex As Exception
MsgBox("SendData")
UpdateList(controlclientitem)
End Try
End Sub