Results 1 to 9 of 9

Thread: Help With Winsock ( Send Packet )

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2007
    Posts
    5

    Help With Winsock ( Send Packet )

    Spanish / English

    Buenas noches, necesito crear un programa en Visual Basic que haga lo siguiente:

    Al tocar la tecla "X" se envie el paquete de informacion ( 05 0E por ejemplo ) a tal direcion de ip mediante tal socket ...

    Tengo el ip, tengo el socket, tengo el paquete, me faltaria solo saber como enviarlo, alguna solucion? ...

    ****************************
    ****************************

    Good night, I need to create a program in Visual Basic that does the following thing:

    When touching the key "X" send the packet of information (05 0E for example) to so address of IP by means of so socket ...

    I have the IP, I have socket, I have the package, but not like sending it, some solution? ...

    Notes:
    Ip: 127.0.0.1 ( for example )
    Socket: 1000
    Port: 7500
    Packet: 05 0E

    Edit:

    Code:
    Private Sub Command1_Click()
    
    Dim myArr(1) As Byte
    myArr(0) = 5
    myArr(1) = 0
    
    Winsock1.RemoteHost = "xxx.xxx.xxx.xxx"
    Winsock1.RemotePort = xxxx
    Winsock1.LocalPort = "xxxx"
    Winsock1.SendData myArr
    
    End Sub
    Error:



    Last edited by Jorgitoh; Sep 22nd, 2007 at 04:24 AM.

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