Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Where Can I Download Winsock?


Where can I download winsock? link?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Download HTML With Winsock
How can this be done?

Download HTML Via Winsock
Hi,

I have no problems downloading HTML via winsock, but naturally all I get is the raw HTML page. To get the data to appear in a Browser, I write the incoming HTML data to a local HTM file, and then launch IE and load the local HTM file.

Is there a better way of doing this that doesn't involve downloaded to a local file etc.

The reason for doing this is because I'm adjusting some of the html before it hits the browser.

Mabs

Winsock HTTP Download
Hello, how to creat a FILE DOWNLOAD using WINSOCK, download files from HTTP server, with PROGRESSBAR!

THANKS!!!

Download Picture Using Winsock
does anyone know how to download a picture and save it to your computer using winsock(i need to do it in winsock)? i tried searching pscode.com, but no luck.

Download With Winsock.....*RESOLVED*
Hey guys!

Its is possible to make a download of a ".mdb" from a ftp server?

Or I have to use inet anyway?

Thanks guys!

Elminster

Winsock Download Code...?
Could you show me a simple example using the Winsock control that downloads a file from server, shows the file size and the bytes loaded, and handles connection erros?

Thank you.

Download A File With Winsock, PLEASE HELP
Hello I have a problem a code, i can send i file (c:data.mdb) to a ftp server (ftp.direccion.com) but i can´t recived a file to this server, if something have the code to recived data with a ftp server to a C: please send me to my mail iban@servinet.es, here is the code that i use: (that i need is the inverse, that is to say recived a file to a ftp server, here i can send a file to a c:


Const AZUL = &HFF0000 'COLOR WINDOWS AZUL
Const NEGRO = &H0& 'COLOR WINDOWS NEGRO
Private Declare Function GetWindowDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function ReleaseDC Lib "user32" (ByVal hwnd As Long, ByVal hdc As Long) As Long
Private Declare Function StretchBlt Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal nSrcWidth As Long, ByVal nSrcHeight As Long, ByVal dwRop As Long) As Long
Private Declare Function DIWriteJpg Lib "DIjpg.dll" (ByVal DestPath As String, ByVal quality As Long, ByVal progressive As Long) As Long

Dim Commun(5) As Com
Dim CommunState As Integer
Dim Site As String
Dim Username As String
Dim Password As String
Dim Remotefile As String
Dim Localfile As String
Dim Buffersize As Long
Dim CloseAfterSend As Boolean
Const SRCCOPY = &HCC0020
Dim CuentaAtras As Integer
Dim Contador As Integer

Public Sub CopyImg(ByVal Pic As PictureBox, Optional Zoom As Boolean)
Dim hdc As Long
hdc = GetWindowDC(0)
If Zoom = True Then
EsquinaX = 200
EsquinaY = 200
Else
EsquinaX = 100
EsquinaY = 100
End If
Ancho = Screen.Width - (3 * 10 * EsquinaX)
Alto = Screen.Height - (3 * 10 * EsquinaY)
StretchBlt Pic.hdc, 0, 0, Pic.ScaleWidth, Pic.ScaleHeight, hdc, EsquinaX, EsquinaY, Screen.Width - 2200, Screen.Height - 2500, SRCCOPY
ReleaseDC 0, hdc
Pic.Refresh
End Sub

Private Sub Form1_Load()
Form1.Command1.Caption = "DETENER"
Form1.Label1.ForeColor = AZUL
Form1.Timer3.Enabled = True
End Sub
Private Sub Command1_Click()
If Form1.Command1.Caption = "COMENZAR" Then
'Form1.WindowState = 1 'MINIMIZO
Form1.Command1.Caption = "DETENER"
Form1.Label1.ForeColor = AZUL
Form1.Timer3.Enabled = True
'Contador = 0
Else
Form1.Command1.Caption = "COMENZAR"
Form1.Timer1.Enabled = False
Form1.Timer2.Enabled = False
Form1.Timer3.Enabled = False
Form1.Timer4.Enabled = False
End If
End Sub

Private Sub Command2_Click()
End 'SALGO DE LA APLICACIÓN
End Sub




Private Sub Timer1_Timer()
'CONTROLA LA CAPTURA DE PANTALLA
Dim obj As CCAPTURE
Set obj = New CCAPTURE
'Call CopyImg(Form1.Picture1, False) 'COPIO LA IMAGEN AL PICTUREBOX
Form1.Timer1.Enabled = False
Form1.Timer2.Enabled = True
End Sub

Private Sub Timer2_Timer()
'ESCRIBE LA CAPTURA A UN BMP

Dim obj As CCAPTURE
Set obj = New CCAPTURE
Contador = Contador + 1
Form1.Label1.ForeColor = NEGRO
Form1.Label2.ForeColor = AZUL
'obj.FileName , "C:datos.mdb"
'obj.Capture Form1.Picture1.hwnd, "c:datos.mdb"
'''ACTIVO LA SIGUIENTE LINEA DE CÓDIGO SI QUIERO TENER UN
''' REGISTRO DE LAS IMÁGENES QUE ESTOY ENVIANDO AL SERVIDOR.
'obj.Capture Form1.Picture1.hwnd, "c:screen" & Str(Contador) & ".bmp"
'Beep

Form1.Label2.ForeColor = NEGRO
Form1.Label3.ForeColor = AZUL
Form1.Timer2.Enabled = False
Form1.Timer5.Enabled = True
'NOTA IMPORTANTE --> DEL TIMER 2 PASA AL 5 PARA VOLVER LUEGO AL 3
' ES DECIR, EL TIMER 5 ESTA INTERCALADO ENTRE EL 2 Y EL 3
End Sub



Private Sub Timer3_Timer()
'CONECTA AL SERVIDOR FTP
Form1.Label3.ForeColor = NEGRO
Form1.Label4.ForeColor = AZUL
Form1.Timer3.Enabled = False
MandaPorFTP
End Sub

Private Sub Timer4_Timer()
'ACTIVA LA CUENTA ATRÁS
'Dim Intervalo As String
'INTERVALO= TIEMPO QUE TARDA EN REPETIR EL PROCESO EN SEG.
' (MENOS APROX. 10 SEG. QUE TARDA EN REALIZAR FOTO + CONVERSION)

'Intervalo = "50"
' If Form1.Label7.Caption = "" Then Form1.Label7.Caption = Intervalo
' Form1.Label7.Caption = CStr(CInt(Form1.Label7.Caption) - 1)
' If Form1.Label7.Caption = "0" Then
' Form1.Label7.Caption = ""
' Form1.Label5.ForeColor = False
' Form1.WindowState = 1 'MINIMIZO SIEMPRE ANTES DE SACAR LA "FOTO"
' Form1.Label1.ForeColor = AZUL
' Form1.Timer4.Enabled = False
' Form1.Timer1.Enabled = True
' End If
End
End Sub

Private Sub Timer5_Timer()
'LA SIGUIENTE FUNCION PASA EL CODIGO DE BMP A JPG
'LOS PARAMETROS SON: IMAGEN ORIGEN, IMAGEN FINAL, CALIDAD JPG, ¿BORRA ORIGEN?
'ConvertBMPtoJPG "c:screen.bmp", "c:screen.jpg", 70, True
Form1.Timer5.Enabled = False
Form1.Timer3.Enabled = True
End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
Dim tmpS As String
Winsock1.GetData tmpS, , bytesTotal
Debug.Print tmpS;
'SACO POR PANTALLA LAS TRANSACCIONES CON EL SERVIDOR FTP
Form1.Label6.Caption = tmpS


Select Case Left(tmpS, 3)
Case Commun(CommunState).Reply
Winsock1.SendData Commun(CommunState).BackCommand + Chr(13) + Chr(10)
Debug.Print Commun(CommunState).BackCommand
'SACO POR PANTALLA LAS TRANSACCIONES CON EL SERVIDOR FTP
Form1.Label6.Caption = tmpS

CommunState = CommunState + 1
Case "150"


Do Until Winsock2.State = 7
DoEvents
Loop
SendNextData
Case "226"
Winsock1.Close


Do Until Winsock1.State = 0
DoEvents
Loop
Close #1
Form1.Label6.Caption = ""
Form1.Timer4.Enabled = True
'Kill "c:screen.jpg"
'Form1.Picture1.Cls

Form1.Label4.ForeColor = NEGRO

Form1.Label5.ForeColor = AZUL

'Form1.Label7.Visible = True
'''ACTIVO LA SIGUIENTE LINEA DE CODIGO PARA QUE ME SAQUE UN MSGBOX INFORMANDOME DEL ENVIO OK
'''MsgBox "Transfer complete.", vbOKOnly + vbInformation, "FTP Upper"
Case Else
'ALGO HA FALLADO
MsgBox "Bad reply: " + Left(tmpS, Len(tmpS) - 2), vbOKOnly + vbInformation, "FTP Upper"
End Select
End Sub


Private Sub Winsock2_ConnectionRequest(ByVal requestID As Long)
Winsock2.Close


Do Until Winsock2.State = 0
DoEvents
Loop
Winsock2.Accept requestID


Do Until Winsock2.State = 7
DoEvents
Loop
End Sub


Sub SendNextData()
Dim Take As Long
Dim Buffer As String
If LOF(1) - Seek(1) < Buffersize Then Take = LOF(1) - Seek(1) + 1 Else Take = Buffersize
Buffer = Input(Take, 1)
Winsock2.SendData Buffer
'Winsock2.GetData Buffer

If Take < Buffersize Then
Close #1
CloseAfterSend = True
End If
On Error Resume Next
Label6 = Trim(Str(Seek(1))) + "/" + Trim(Str(LOF(1)))
On Error GoTo 0
End Sub


Private Sub Winsock2_SendComplete()


If CloseAfterSend = True Then
Winsock2.Close


Do Until Winsock2.State = 0


DoEvents
Loop
CloseAfterSend = False
Else
SendNextData
End If
End Sub

Private Sub MandaPorFTP()
Site = "ftp.servidor.com" 'SERVIDOR FTP
Username = "username.com" 'LOGIN DEL SERVIDOR FTP
Password = "pass.com" 'PASSWORD
Localfile = "c:data.mdb"
Remotefile = "data/data.mdb"
Commun(0).Reply = "220"
Commun(0).BackCommand = "USER " + Username
Commun(1).Reply = "331"
Commun(1).BackCommand = "PASS " + Password
Commun(2).Reply = "230"
Commun(2).BackCommand = "TYPE I"
Commun(3).Reply = "200"
Commun(3).BackCommand = "PORT"
Commun(4).Reply = "200"
Commun(4).BackCommand = "STOR " + Remotefile
Commun(5).Reply = ""
Commun(5).BackCommand = ""
Buffersize = 2920
Dim Nr1 As Integer
Dim Nr2 As Integer
Dim LocalIP As String
LocalIP = Winsock1.LocalIP


Do Until InStr(LocalIP, ".") = 0
LocalIP = Left(LocalIP, InStr(LocalIP, ".") - 1) + "," + Right(LocalIP, Len(LocalIP) - InStr(LocalIP, "."))
Loop
Randomize Timer
Nr1 = Int(Rnd * 12) + 5
Nr2 = Int(Rnd * 254) + 1
Commun(3).BackCommand = "PORT " + LocalIP + "," + Trim(Str(Nr1)) + "," + Trim(Str(Nr2))
Winsock2.Close


Do Until Winsock2.State = 0
DoEvents
Loop
Winsock2.LocalPort = (Nr1 * 256) + Nr2
Winsock2.Listen
Winsock1.Close


Do Until Winsock1.State = 0
DoEvents
Loop
Winsock1.RemoteHost = Site
Winsock1.RemotePort = 21
Winsock1.Connect
CommunState = 0


Do Until Winsock1.State = 7 Or Winsock1.State = 9
DoEvents
Loop


Select Case Winsock1.State
Case 9

MsgBox "No puedo conectar con " + Site + ".", vbOKOnly + vbInformation, "FTP Upper"
Form1.Command1.Caption = "COMENZAR"

Case 7
Open Localfile For Binary As #1
End Select
End Sub

Get Your Winsock File Download Here.
Ok this has proubly been posted before, but hey I want to contribute.

Actually I just took the VB-World.net's Winsock web page download example and modified it a bit to download binary files. All you gotta do is make a new form with a winsock control in it and then copy and paste the following code. Enjoy!


Private Sub Form_Load()

'server winsock1 will connect to
Winsock1.RemoteHost = "ishthefish0.tripod.com"
'port winsock1 will connect to (port 80=HTTP port)
Winsock1.RemotePort = 80
'connect to server
Winsock1.Connect
'open file on desktop (change this if it doesn't match your windir)
Open "c:windowsdesktopdonkey.jpg" For Binary As #1

End Sub

Private Sub Winsock1_Connect()

Dim strCommand As String
Dim strWebPage As String

'strWebPage = the URL of the binary file to download
strWebPage = "http://ishthefish0.tripod.com/donkey.jpg"

'some stuffs that I assumes your net browser sends to HTTP servers
'when it wants to recieve files, (i may be mistaken)
strCommand = "GET " + strWebPage + " HTTP/1.0" + vbCrLf
strCommand = strCommand + "Accept: */*" + vbCrLf
strCommand = strCommand + vbCrLf

'send the command to the server
Winsock1.SendData strCommand

End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)

'when the server sends data back to winsock1:
'capture it and write it to a file

Dim webData As String

'get the data that winsock1 recieves and store it in webData string
Winsock1.GetData webData, vbString
'write the data to file #1
Put #1, , webData

End Sub

Private Sub Winsock1_Close()

'the connection is automatically closed once the file transfer is
'complete (tripod does at least, other web servers may differ)

'close the file
Close #1
'and end the program
End

End Sub

VB5 Download W/ Progress Wo/ Winsock
How would I download a file without using winsock but with a progress bar? I have Visual Basic 5 so I cannot use the example that is floating around here because of the InStrRev function. I did find a homemade InStrRev function, but even after using it, the program just gave a Path/File access error. Please help!

Using Winsock To Download Files
Howdy!

I'm using MS Visual Basic 6.0 in Windows 98 2nd.ed. I would like to learn to dowload a zip-file from my ftp-site using the in-built Winsock-protocol. How to do this? How to determine password, user name and the port?Can I use Winsock to retrieve the size of the file that I'm downloading? I mean before I have downloaded the whole file. If it not possible with Winsock, how is it then?
How to check how much (how many bits) I have downloaded compared to the whole file.

Waiting for your answer,
Mr.L.


P.S. I have tried DevPower's FTP-control (www.devpower.com) but it doesn't meet my requirements.

Ftp Download Problem Using Winsock
Hi,

I am writing FTP Client using Winsock control in vb6. I have problem with downloading . I am sending the RETR and command and writing the data which is comming on DataArrival event of data socket. but it seems few bytes are missing. can anyone please explain me how to do donwloading using winsock.
and if i want to receive my custom size of buffer how should i handle.
please help me.

Regards
Praveenp

Download Using The Winsock Control
CAn i use the winsock control to download a file ie google.com's logo

i think the code will be smthing like winsock1.conect "google.com/stpatricks_05"

Also what is a local port how do u find it out and how do u find out your ip - because i know i have more than one if i use netgear.

WINSOCK: Bytes Per Download
Is there any way I can record the number of bytes being downloaded by a particular program (e.g. IE, Download accelarator) using VB/Winsock? Please, any help?

Thanks in advance

 

Getting The Winsock Upload/download Speed...
Im making a program in which i need to calculate the speed of the winsock when downloading or uploading a file

can anybody out there please tell me how to do it?

and a piece of LOGIC or CODE of how to do it?

I'd really appreciate it!

Thanks a lots!

Ftp Download Problem Using Winsock Control
Hi,

I am writing FTP Client using Winsock control in vb6. I have problem with downloading . I am sending the RETR and command and writing the data which is comming on DataArrival event of data socket. but it seems few bytes are missing. can anyone please explain me how to do donwloading using winsock.
and if i want to receive my custom size of buffer how should i handle.
please help me.

Regards
Praveenp

Winsock Does Not Always Download The Complete File !
Hi there and Merry Christmas !!
i have some winsock controls that download images from the
internet. The problem is they sometimes do not download the
entire image and crop the image into a smaller size.

Any help?

should i get the original size and then try to download the image again if i see any difference between the downloaded image file size and the original file size?

thanks !

Help!How To Download A File With Winsock Control?
Thank you very much!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Mail to me:jackgreenfox@peoplemail.com.cn
jackgreenfox@yahoo.com.cn

Download A File Using Inet Or Winsock
Hi All,

I want to download an mp3 file in my vb6 app using Inet or Winsock.
This mp3 file must be stored on the harddisk of the computer
(can be app's root directory, app.path)

i tried this with winsock, but it seems that i can't download the whole file. But when i want to save it using the common OPEN filename FOR OUTPUT S #1 vb puts " " marks around the data.
now an mp3 player (winamp) can't open the audio stream.

so i thought.. maybe it can be done with Inet, but i don't know nothing about that control.. can someone help me.. ????

thnxx,

Jeroentjuuh

Download Files Via Winsock And Http
Hi All,

I found some code that will download a specified file using the winsock control and http:get. I would like to loop through the avail files, get the names and size. Then download, while having some type of progress bar. My project is attached. Does anyone happen to know how to get file sizes, etc?

VB World Winsock Tutorial Download
Trying to get the download to VB worlds Winsock program
to work??? (by Karl Moore). Has anyone got it to work??


What do I do to get the download to work??
I made the sending/recieving programs without
any luck so I used the downloaded program.
The downloaded program gave me "Connection Problem" when trying to make connection. I used the given IP address given in the program and the IP address that my computer has without luck.

Winsock Download HTML File
Im trying to download a html file with
winsock. im not sure of why but its not
working.. could someone who knows alittle
more than me give me some code.

thanks

Winsock Error In Implementing FTP Download...
Hi,

I have developed a ftp client programme using MSWinsock control in vb6. Everything goes fine. But, in case of donwloading a file in intranet, data socket is getting closed before getting Full file. so for this, on close event of data socket, i added a check that whether the full file received or not, if received i am closing if not leaving. in this case, socket state is already changed to sckClosing , but still dataarrival event occours. But, if I try to retrieve data using Getdata method, it generates an error:40006-Wrong protocol or connection state for the requested transaction or request, because of socket state is changed and it is in closing state.
can any one please help me in fixing this bug..? is this the winsock control Bug?
If so, is there fix for this?

Thanking you in advance.

Regards
Praveenp

Winsock Error In Implementing Ftp Download
Hi,

I have developed a ftp client programme using MSWinsock control in vb6. Everything goes fine. But, in case of donwloading a file in intranet, data socket is getting closed before getting Full file. so for this, on close event of data socket, i added a check that whether the full file received or not, if received i am closing if not leaving. in this case, socket state is already changed to sckClosing , but still dataarrival event occours. But, if I try to retrieve data using Getdata method, it generates an error:40006-Wrong protocol or connection state for the requested transaction or request, because of socket state is changed and it is in closing state.
can any one please help me in fixing this bug..? is this the winsock control Bug?
If so, is there fix for this?

Thanking you in advance.

Regards
Praveenp

Using Winsock To Download Off A Network Share
Hi,
How do i retrieve a file (text, binary or whatever) from a remote networ share to my PC?
like a file from //node34/letters/memo1.txt
or //192.16.2.10/shared/game.exe ?

Also, can i somehow split this to download in multiple threads to boost speed ?

Winsock Error In Implementing Ftp Download
Hi,

I have developed a ftp client programme using MSWinsock control in vb6. Everything goes fine. But, in case of donwloading a file in intranet, data socket is getting closed before getting Full file. so for this, on close event of data socket, i added a check that whether the full file received or not, if received i am closing if not leaving. in this case, socket state is already changed to sckClosing , but still dataarrival event occours. But, if I try to retrieve data using Getdata method, it generates an error:40006-Wrong protocol or connection state for the requested transaction or request, because of socket state is changed and it is in closing state.
can any one please help me in fixing this bug..? is this the winsock control Bug?
If so, is there fix for this?

Thanking you in advance.

Regards
Praveenp

Winsock Does Not Always Download The Complete File !
Hi there and Merry Christmas !!
i have some winsock controls that download images from the
internet. The problem is they sometimes do not download the
entire image and crop the image into a smaller size.

Any help?

should i get the original size and then try to download the image again if i see any difference between the downloaded image file size and the original file size?

thanks !

Download A File From HTTP Server With Winsock
I was wondering if anyone had some code to download a file from a webserver with winsock? I have been using the Inet control and it's OK. And I searched these forums for a while and the code library section (where I found in another post there would be an example there though I didn't find one that pretained to this.) Anyhow - The execute thing doesn't always work though and it doesn't support a resume feature. If someone has any code to download from a webserver to a file it would be greatly apreciated. I know if I can get a simple code running I could build off of it pretty easy. Thanks!

Possible To Download/upload Files Into FTP Using WinSock 2.0 Or CSocket ?
As the topic says..
Is there any way to use one of those 2 controlers to upload files to ftp?

Also would be great if there exists some module/class for MsInet

I didn't wanted to use ocx files in this ftp client.

Download A Web Page Without Using Inet Or Winsock Control
Is there a way using VB6 to download the contents of a webpage without using the Inet or Winsock controls? I'm writing a small VB app that needs to pull a webpage and check the contents of it. I want to avoid having to include either one of the controls with my final progect. I believe there was a way to do it using VBScript but forget how.

Inet, Winsock, Or ? How Can I Download Files... Not HTML
Ok i know i might bother some times with the same questions but only because i have no true means or backing up my data.

Here are my questions:

1. How can i download files off of the internet (if not a problem ip also)
2. Is it possible to download multiple files at once? If yes how?
3. How would i get information about the file such as Size, Date(not important) and name (also if possible type also).


Thanks to any help.

Data Is Lost In File Download Using FTP/Winsock Control
I'm using Winsock control and the FTP to download file from a server. Now my problem is, I can't keep a consistent file download (with the same file!). Sometimes, I can download the whole file size, sometimes I can't. I figured fast connection can result to data "lost" - that is, my code most probably wasn't able to capture ALL the data received.

So this is my question, how can you ensure that ALL data shall be received and stored into the local file?

Do look at my current code (I only included this single procedure cuz I take it the answer to the problem lies in here.):

+++++++++++++++++++++++++++++++++++++++++++++++++++++

Private Sub wscClient_DataArrival(ByVal bytesTotal As Long)
Dim sTmp As String

Do Until wscClient.State = sckConnected
DoEvents
Loop

'save to local file
wscClient.GetData sTmp, , bytesTotal
Open gstrFileName For Binary As #1
Put #1, lngByteSent, sTmp
lngByteSent = Seek(1)
Close #1
lngProgress = lngByteSent

'file complete
If (lngProgress = lngTotalByte) Then
MsgBox "File Transfer finished. You may now proceed.", vbOKOnly, "Download Files"
wscClient.Close
End If

End Sub
+++++++++++++++++++++++++++++++++++++++++++++++++++++

Winsock Nightmare.. How Can You Download Jpgs From Websites? (http)
i cant seem to do it.. i dont think i can use .getdata mystring,vbstring..

but then how can i parse the headers and still have the image?

Difference Between Http Download And Ftp Download
Guys,
what is the differences between them ???? i am confuse here ..... any expert mind to explain ?? which can resume download?? both??

VB .NET To Download Or Not To Download; That Is The Question
I'm looking for some opinions about VB .NET which will ultimately decide whether I download it or not. My first question is how big is the official download for the entire studio? The one on which I am planning to download is 780 mb in a rar archive. If this is much larger than what it should be then please tell me. Perhaps my biggest concern is the amount of hard drive needed, as of now I only have about 378 mb available, but only plan on installing VB. Is this enough? Another one of my concerns is how much of a beta is this. Are you able to uninstall it? Has it ever crashed anybodies hard drive? I have a lot of things that I'm not willing to lose and I would HATE having to reinstall Windows. Does it need a new DLL or does it still work with msvbvm60? Have you noticed a lot of bugs in it? Is it really much better than 6? Please help me out here, 780 is a substantial download for me and I don't want to waste it.

Winsock State 8 - Peer Closes The Connection Leaving Winsock High And Dry
I am debugging some web/proxy-serving code. I am stumped.

I get Winsock state 8 - Peer is closing the connection
Then Winsock error message wrong protocol or connection state.

It seems to me that Winsock closes before it can finish sending all of its data.

How can I keep Winsock in state 7 - Connected?


Thanks...

Winsock Error (System Lockup Upon Winsock Execution)
Has anyone encountered an issue when running the winsock command and either a .listen or .connect locks up your VB Studio? This is occurring on my system and I'm not sure if its a problem with my current DLL or if I'm just not doing something correctly.

Please help.

Chris, Baltimore.

Winsock Syntax? (To Request A Website With The Winsock Control)
Ok, I don't know very much about Winsock and am just now starting to use it. I'm making an anonymity program that modifies referer and user agent data. I managed to find an example of how its done on planetsourcecode.com but there's a few things that aren't working.

Anyway, when this string is sent, it sends the headers and a request for index.html from the connected host (winsock1.connect domain.com 80).

GET index.html HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-comet, */*
Accept-Language: en
Accept-Encoding: gzip , deflate
Cache-Control: no-cache
Proxy-Connection: Keep-Alive
User-Agent: Whatever
Referer: www.whatever.com

But when I used the website http://ipid.shat.net/ as the domain to see if code mdified the headers or not, it directed me instead to just www.shat.net. How would a browser request information to ipid.shat.net?

Also, I noticed that by sending just that information, cookies don't work properly. What other tags do I have to add onto that for it to recieve my session information? Thanks a lot.

Winsock - Send PictureBox Contents Thrue Winsock?
Hey all, is it possible to send the contents of a PictureBox thrue a Winsock?

I know i can save the contents first to file and then send as file, but wondering this is possible, the purpose is in my chat project i have a webcam capture feature wich works fine, but i can't figure out how i can send this stream, did some searches but not found any results about it.

=============================================
aka Red2048.

Very Frustrating Winsock Bug.. Winsock Stops Responding After A While.
I have about 100 winsocks in an array handling a bunch of tasks.

The program seems to work fine for a while, but then for no reason, winsock stops responding. I can receive and send thosuands of packets before this happens but when the bug occurs it is extremely frustrating.

Winsock seems to die completely. DataArrival never fires, I cant make new connections (Always stuck on 'Connecting..'), its a mess. Closing the program and reopening it does not solve the problem - I have to close VB6 entirely and reopen it for the application to work again.

Has anyone dealt with something like this in the past?

I have no idea whats wrong

Winsock Error &lt;winsock.getdata Strdata
Hi

I am using winsock control named tcpclient in my application.
When i call the statement as

tcpclient.getdata strdata

It raises an error showing as

Runtime Error : "10054"
The connection is reset by remote side

I don know why this error is coming pls help me if uve any idea


Thanx

Will Winsock Get Timedout? Can Do Login On Winsock.connect?
Hi all,
Just wondering, let say I connect to a server using Winsock and leave the connection open... does Winsock timeout or close that connection? If yes, how long winsock give before it timeout/close the connection?

Is it possible to do a login on winsock.connect; ie: winsock.connect userid, pwd? I'm thinking if possible everytime i connect, i pass the userid and pwd to the server for validation... if all correct than accept the connection else reject... is this possible?

Thank You
Regards

WINSOCK CONTROL Vs WINSOCK REFERENCE
Why with a Winsock refernce events don't work and with a Winsock control events work?
"public withevents MySock as winsock". With this declaration, I can't use events (like connectionrequest ecc.).
With a WinSock control I can use events. WHY????

Winsock API Webserver (not Winsock Control)
Hi,
I'm trying to do a winsock webserver, that can handle lots of connections at once.
each new connection request creates a new instance of the winsock control
ie load winsock(1).....etc
it needs to be able to handle 200 users but it looses connection requests every so often and so some people cant connect I think this is because the winsock control cant handle so many connections at once. Would coding using the WIN API be better (quicker)???
Thanks
Paul

WinCE Winsock And Regular Winsock
Hello all

Is there a certain way that win CE winsock sends its data? for example.

in the regular winsock i do something like
winsock.senddata "Hello World"

in the CE winsock i msgbox the data that is received and it is in one msgbox. However, if I turnaround and send something from the CE winsock to the regular windows winsock i would get two msgboxes one containing the first letter of the message, and a second box containing the rest of the message? Any ideas?

ActiveX DLL's, Winsock And Winsock Events
If I create an ActiveX DLL that has an winsock control in it, do the events for the winsock control still occur?

Flushing In Winsock Control And Winsock API
I used to work in Java Sockets previously and there I have been using flush method of the associated stream with Socket class to make sure that the data I sent using Sockets is successfully sent; simple to flush the Socket.

But, here in Vb I can find any function or method fulfilling the same purpose. Can anyone give me some idea about how to do it with Winsock Control or Winsock API?

Normally winsock works quiet well but in my previous project I faced a related problem about transmitting data. Therefore, while using it for the second time, I am a concious about it and working on the solution to the 'data delay' problem before working on the actual system.

thanx

FTP Download
Hi, I am making a program that will connect to an ftp server and download a "text" file. Then it will open up the text file and read. The problem lies on the part where I download the text file.

I'm using the INET FTP object with the Get function.
The problem is that the newlines in the text file are skipped. Somehow, the method of downloading the text file off the ftp is wrong. I'm missing all the newlines. How do I get around this?

XFMain.Inet1.Execute , "GET """ & strRemote & """ " & strLocal

Thanks

Download
Ok for sake of argument say i have a site called. http://www.me.com/me.exe i want to have inet control on my program and everytime a button is clicked i want that file to be downloaded into the dir "c:chatimg" and if its already there i want the old one to be replaced and the new one saved so the shortcut on my desktop still works. can somebody help me please. Im very in need of help. Thanks.....

Copyright © 2005-08 www.BigResource.com, All rights reserved