Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Socket problem

Socket problem

Scheduled Pinned Locked Moved Visual Basic
helpquestion
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    XGaMeS
    wrote on last edited by
    #1

    Im trying to send command trought TCP-IP to a remote application. I use something like this : Dim myIpHostInfo As IPHostEntry = Dns.Resolve(strIP) Dim myIPAdress As IPAddress = myIpHostInfo.AddressList(0) Dim myRemoteEP As New IPEndPoint(myIPAdress, strPort) Dim bytesSent As Integer Dim mySender As New Sockets.Socket(Sockets.AddressFamily.InterNetwork, Sockets.SocketType.Stream, Sockets.ProtocolType.Tcp) mySender.Connect(myRemoteEP) Dim Key As System.Windows.Forms.Keys Dim CommandTest As Byte() = System.Text.Encoding.ASCII.GetBytes("/createdoc(NewDocument, 210 mm, 297 mm, 12 mm, 12 mm, 12 mm,12 mm, 0, 1, 5 pt, 0)" & Key.Enter & Key.LineFeed) I know im connected but every command i send does not do anything and return anything. :confused: Can it be possible that the fact i send in bytes and not String is the cause ? Maybe Winsock could handle that ? X| I am a newbie

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups