como llegan los datos al Cliente? me refiero al contenido de DataArrival. Al parecer llega en forma de html, ilustranos para así ayudarte a obtener los datos.
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes MenúPut #1, , arxivo
dim hFile As Integer
hFile = FreeFile()
Open arxivo For Binary Access Write Lock Write As hFile
Put #hFile, 1, arxivo
wsock.connect remoteHost, remotePort
wsock.SendData "Hola Mundo!"
wsock.Connect remoteHost, remotePort
If (waitForConnect(wsock, varSecondsToWait) = True) ' se conectó?
'// Codigo a ejecutar ahora que ya se conectó
End If
Picture1.Image = LoadPicture(App.Path & "\miImage.jpg")
Picture1.Image = LoadResPicture(resID, vbResBitmap)
Public Declare Function accept Lib "wsock32.dll" (ByVal s As Long, addr As sockaddr, addrlen As Long) As Long
Public Declare Function bind Lib "wsock32.dll" (ByVal s As Long, addr As sockaddr, ByVal namelen As Long) As Long
Public Declare Function closesocket Lib "wsock32.dll" (ByVal s As Long) As Long
Public Declare Function htons Lib "wsock32.dll" (ByVal hostshort As Long) As Integer
Public Declare Function inet_addr Lib "wsock32.dll" (ByVal cp As String) As Long
Public Declare Function inet_ntoa Lib "wsock32.dll" (ByVal inn As Long) As Long
Public Declare Function listen Lib "wsock32.dll" (ByVal s As Long, ByVal backlog As Long) As Long
Public Declare Function recv Lib "wsock32.dll" (ByVal s As Long, ByVal buf As Any, ByVal buflen As Long, ByVal flags As Long) As Long
Public Declare Function send Lib "wsock32.dll" (ByVal s As Long, buf As Any, ByVal buflen As Long, ByVal flags As Long) As Long
Public Declare Function socket Lib "wsock32.dll" (ByVal af As Long, ByVal s_type As Long, ByVal protocol As Long) As Long
Public Declare Function gethostbyname Lib "wsock32.dll" (ByVal host_name As String) As Long
Public Declare Function gethostname Lib "wsock32.dll" (ByVal host_name As String, ByVal namelen As Long) As Long
Public Declare Function WSAStartup Lib "wsock32.dll" (ByVal wVR As Long, lpWSAD As WSADataType) As Long
Public Declare Function WSACleanup Lib "wsock32.dll" () As Long
Public Declare Function WSAAsyncSelect Lib "wsock32.dll" (ByVal s As Long, ByVal hWnd As Long, ByVal wMsg As Long, ByVal lEvent As Long) As Long
' Poner la propiedad Index del objeto a 0 lo que
' hace es crear un Array() del objeto
' Setearlo en la edicion de la App pues en ejecucion
' el valor Index es de solo lectura.
Objeto WSock.Index = 0
' para crear otro WSock solo hay que ampliar la matriz
Load WSock(0) ' iniciar la matriz!!
' crear un nuevo objeto
Load WSock(WSock.Ubound + 1)
' Cuidado!
' para recibir los eventos de los Objetos en una matriz
' se reciben en la misma funcion. EJ:
Private Sub WSock_Connect(Index As Integer)
' Noten el argumento Index, éste hace mencion al indice en
' nuestra matriz del Objecto que hemos creado.
if WSock(Index).status = sckConected then MsgBox "Conectado!"
' para quitar un Objeto de la matriz
Unload WSock(Index)
'// CODE...
End Sub
' Crear un modulo de objeto y agregar el objeto WSock a las
' librerias de la aplicacion y poner en en modulo:
Private With Events WSock As Winsock
' y cada vez que se quiera crear un nuevo objeto, en el formulario
' o en en algun modulo solo:
dim varObj() As New nombreDelModuloDeObjeto
redim varObj(0)
' .... // CODIGO:
https://skydrive.live.com/?cid=49ed785dcb63f232&sc=documents&uc=1&id=49ED785DCB63F232%21221