VB - How to send a file using the Winsock control - Page 3-VBForums
Page 3 of 3 FirstFirst 123
Results 81 to 85 of 85

Thread: VB - How to send a file using the Winsock control

  1. #81
    Lively Member
    Join Date
    Oct 2011
    Posts
    126

    Re: VB - How to send a file using the Winsock control

    So it means increasing the packet size won't increase the upload/download speed?

    I have one more problem please,
    you implemented stuff like speed, time remaining and bytes sent for sender side, but not in the receiver side which i can't figure out.
    Can you please help me with this. Thanks Again

    Here is the code from the sender side
    Code:
    Private Sub tmrCalcSpeed_Timer()
        Static PrevSent As Long
        Dim BSentPerSec As Long, DataSent As Long, DataLen As Long
        Dim SecondsLeft As Single
        
        If iFileNum > 0 Then
            DataSent = Loc(iFileNum)
            DataLen = LOF(iFileNum)
            
            BSentPerSec = DataSent - PrevSent
            PrevSent = DataSent
            
            SecondsLeft = (CSng(DataLen) - CSng(DataSent)) / CSng(BSentPerSec)
        Else
            PrevSent = 0
        End If
        
        lblSendSpeed.Caption = Format(DataSent / 1024#, "###,###,##0.00") & " KBytes Sent, " & _
            Format(CDbl(BSentPerSec) / 1024#, "#0.00") & " Kb/Sec, " & _
            "Time left: " & Format(SecondsLeft \ 3600, "00") & ":" & Format(SecondsLeft \ 60, "00") & ":" & Format(SecondsLeft Mod 60, "00")
    End Sub
    How i can change it to work with the receiver side?

  2. #82
    New Member
    Join Date
    Feb 2012
    Posts
    3

    Angry Re: VB - How to send a file using the Winsock control

    If many person send a similar file we see Error word in the program .
    How can correct this action?
    Thanks.

  3. #83
    New Member
    Join Date
    Jan 2012
    Posts
    4

    Re: VB - How to send a file using the Winsock control

    hai all can anybody suggest me to "how to get the data in packet by packet format instead of whole stream " plz i hav to submit project soon

  4. #84
    New Member
    Join Date
    Jan 2012
    Posts
    4

    Re: VB - How to send a file using the Winsock control

    hai sir this ramu i hav to read the data at winsock reciever BYTE by BYTE instead of STREAM of data(packet by packet) for that i m using "binary read write mode" but it is not working after sometime it showing the error "DIVISION BY ZERO" problem please help me sir..............

  5. #85
    New Member
    Join Date
    Oct 2014
    Posts
    1

    Re: VB - How to send a file using the Winsock control

    Quote Originally Posted by leon100243 View Post
    why....?
    Please help me~
    I am trying to achieve a similar application.I am not able to find the codes related to this.Will you be able to help me.Thank you

Page 3 of 3 FirstFirst 123

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.