CSagan
Mar 12th, 2000, 09:28 AM
how do i send a large file (more than 64k) via winsock?
Paul282
Mar 13th, 2000, 04:25 PM
open the file into a byte array
dim bytes()
redim bytes(filelen("c:\test.txt")
'after connecting etc
winsock.senddata bytes
Then to recieve ... (append arrived data to a file)
Private Sub wsTCP_DataArrival(Index As Integer, ByVal bytesTotal As Long)
Dim buffer() As Byte
wsTCP(1).GetData buffer
Put #1, lPos, buffer
lPos = lPos + UBound(buffer) + 1