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. Mobile Development
  3. Mobile
  4. Send message to PPC from PC using sockets (Error 10060) [modified]

Send message to PPC from PC using sockets (Error 10060) [modified]

Scheduled Pinned Locked Moved Mobile
helpquestion
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.
  • A Offline
    A Offline
    AlexeiXX3
    wrote on last edited by
    #1

    Hello all Im trying to send an alert to a WM6 Device (Emulator) from my PC Code on PC:

    Dim tcpClient As New Sockets.TcpClient
    Dim portNumber As Integer = 1414 '????
    'ERROR10060 on next line
    tcpClient.Connect(New IPEndPoint(IPAddress.Parse("192.168.55.101"), portNumber))

    Code on PPC:

    Private Sub listener()
    Dim tcpListener As New Sockets.TcpListener(IPAddress.Parse("192.168.55.101"), 1414)
    tcpListener.Start()

        While (True)
            ' Look for notification
            If (tcpListener.Pending()) Then
                ' Get notification message
                Dim tcpClient As Sockets.TcpClient = tcpListener.AcceptTcpClient()
                Dim s As IO.Stream = tcpClient.GetStream()
                Dim buffer(250) As Byte
                Dim bytes As Int16 = s.Read(buffer, 0, buffer.Length)
                Dim message As String = System.Text.Encoding.ASCII.GetString(buffer, 0, bytes)
    
                ' Send back confirmation
                Dim response As String = "OK"
                Dim responseBytes() As Byte = System.Text.Encoding.ASCII.GetBytes(response.ToCharArray())
                tcpClient.GetStream().Write(responseBytes, 0, responseBytes.Length)
    
                tcpClient.Close()
                showNotification(message)
            End If
            System.Threading.Thread.Sleep(1000)
        End While
    End Sub
    

    What am i suppossed to write on the port number?? I have tried several numbers but all of them give me the same error 10060 To get that IP address i run this code on my PPC 'Dns.GetHostEntry(Dns.GetHostName()).AddressList(0).ToString Thanks in advance for any answers -- modified at 15:36 Thursday 4th October, 2007

    Alexei Rodriguez

    I 1 Reply Last reply
    0
    • A AlexeiXX3

      Hello all Im trying to send an alert to a WM6 Device (Emulator) from my PC Code on PC:

      Dim tcpClient As New Sockets.TcpClient
      Dim portNumber As Integer = 1414 '????
      'ERROR10060 on next line
      tcpClient.Connect(New IPEndPoint(IPAddress.Parse("192.168.55.101"), portNumber))

      Code on PPC:

      Private Sub listener()
      Dim tcpListener As New Sockets.TcpListener(IPAddress.Parse("192.168.55.101"), 1414)
      tcpListener.Start()

          While (True)
              ' Look for notification
              If (tcpListener.Pending()) Then
                  ' Get notification message
                  Dim tcpClient As Sockets.TcpClient = tcpListener.AcceptTcpClient()
                  Dim s As IO.Stream = tcpClient.GetStream()
                  Dim buffer(250) As Byte
                  Dim bytes As Int16 = s.Read(buffer, 0, buffer.Length)
                  Dim message As String = System.Text.Encoding.ASCII.GetString(buffer, 0, bytes)
      
                  ' Send back confirmation
                  Dim response As String = "OK"
                  Dim responseBytes() As Byte = System.Text.Encoding.ASCII.GetBytes(response.ToCharArray())
                  tcpClient.GetStream().Write(responseBytes, 0, responseBytes.Length)
      
                  tcpClient.Close()
                  showNotification(message)
              End If
              System.Threading.Thread.Sleep(1000)
          End While
      End Sub
      

      What am i suppossed to write on the port number?? I have tried several numbers but all of them give me the same error 10060 To get that IP address i run this code on my PPC 'Dns.GetHostEntry(Dns.GetHostName()).AddressList(0).ToString Thanks in advance for any answers -- modified at 15:36 Thursday 4th October, 2007

      Alexei Rodriguez

      I Offline
      I Offline
      imranatif
      wrote on last edited by
      #2

      i am also having problem in socket programing. i can not send request from PPC to server application running on same pc can u help me.

      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