Results 1 to 6 of 6

Thread: [CSocketMaster][UDP] Connection reset by peer

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Location
    Slovenia
    Posts
    100

    [CSocketMaster][UDP] Connection reset by peer

    Hy i have one un unintelligible error. In VB6 i try to send UDP packet over the network but i get one idiotic error which doesnt sems to be right becouse UDP packets are not like TCP where you have first to establishe connection and then send packet. UDP packets are just sent they are like "send and forget" If the packet gets there, he gets with no respond message so i can not understand why i get this error "Connection reset by peer" witch is typical for TCP packets...

    VB Code:
    1. ''code for sending some test data
    2.     socket.RemoteHost = txtAddr.Text
    3.     socket.RemotePort = txtRemPort.Text
    4.     socket.SendData Text1.Text



  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: [CSocketMaster][UDP] Connection reset by peer

    What is the exact wording of the error and what is the error number?

  3. #3
    Interweb adm/o/distrator Paul M's Avatar
    Join Date
    Nov 2006
    Location
    Australia, Melbourne
    Posts
    2,306

    Re: [CSocketMaster][UDP] Connection reset by peer

    Well it looks like all you are doing is setting the port and address not actually connecting to it

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [CSocketMaster][UDP] Connection reset by peer

    whats happening om the receiving end? Is it one of your applications receiving the data?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Location
    Slovenia
    Posts
    100

    Re: [CSocketMaster][UDP] Connection reset by peer

    right now i did find out if i enter my localhost address 127.0.0.1 then i get this error. But if i enter any other addres like from my ethernet card 192.168.0.5 or address of my other pc 192.168.0.3 or even the address of linux server 192.168.0.1 i dont get this error. I can enter the address that doesnt exists and i will not get that error.

    I only get error if i enter localhost or 127.0.0.1 which is very weard becouse it have to work for any address even for that doesnt exists, and thats te point of UDP.


    Paul M: in UDP packet protocol you dont have to connect to another host
    Atheist: yes im reciving data on another app but the catch is that only if the address is not 127.0.0.1 or localhost so i can not test my app if im on the way...:/
    Hack: the error number is 10054
    Last edited by BlackCatSLO; Feb 15th, 2008 at 04:05 PM.



  6. #6
    New Member
    Join Date
    Feb 2008
    Posts
    1

    Re: [CSocketMaster][UDP] Connection reset by peer

    Try setting remotehost to '192.168.0.255'

    it will broadcast to ip's 192.168.0.1-254, including the local machine.
    Last edited by Woodman; Feb 15th, 2008 at 08:10 PM.

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