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. REgarding sending data when using socket winsock

REgarding sending data when using socket winsock

Scheduled Pinned Locked Moved Visual Basic
sysadminhelpquestion
2 Posts 2 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.
  • J Offline
    J Offline
    jainiraj
    wrote on last edited by
    #1

    I am using a winsock control in my app. which create UDP socket.When I send the data using below code- Dim sendStr As String sendStr = "hello" wsClient.SendData sendStr Then on server side it shows a string of symbols. But when I send data as- wsClient.SendData "Hello" Then on server side it shows "Hello". What is the problem with first method.

    D 1 Reply Last reply
    0
    • J jainiraj

      I am using a winsock control in my app. which create UDP socket.When I send the data using below code- Dim sendStr As String sendStr = "hello" wsClient.SendData sendStr Then on server side it shows a string of symbols. But when I send data as- wsClient.SendData "Hello" Then on server side it shows "Hello". What is the problem with first method.

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      There is no problem with that code. The two snippets are identical. The problem would have to be somewhere else, or this isn't the exact code you're using. Also, are you saying that you're using the old Winsock control, or are you using the socket classes in System.Net?

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      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