Sub SendData
Dim In As InputStream
Dim AddString As String
Dim Buffer() As Byte
Dim Now As Long
Now = DateTime.Now
'Send the Stream to the Server after Connection
IN.InitializeFromBytesArray(OutStream, 0, OutStream.Length)
File.Copy2(IN,socket1.OutputStream)
'Add File name to Image end
'Get Filename Byte Array place is Buffer
DateTime.DateFormat = "yyyymmdd"
AddString = CRLF & "FILENAME=" & DateTime.Date(Now) & "_" & DateTime.Time(Now)
AddString = AddString & ".jpg"
Buffer = AddString.GetBytes("UTF8")
'Put 'Filename to the end of the Images Array
IN.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
File.Copy2(IN,socket1.OutputStream)
Socket1.Close
End Sub