Results 1 to 2 of 2

Thread: Sending files via winsock

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Location
    Ocotlan, Jalisco, Mexico
    Posts
    18

    Post

    how do i send a large file (more than 64k) via winsock?

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Japan
    Posts
    840

    Post

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width