Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 550413
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:17:09+00:00 2026-05-13T11:17:09+00:00

Let me explain a bit the app i’m doing. I’m creating a central UDP

  • 0

Let me explain a bit the app i’m doing.

I’m creating a central UDP (needs to be UDP) server for multiple and concurrent clients that also “talk” between them.
I do a check into a dict of known clients addresses and create a client handler thread if “i dont know” the client. Else, the thread receives the data ad does its job.
The new thread receives a reference to the socket and the caller address, so they use socket.sendTo with that address and the data.

The problem appears when a client closes it’s client (Alt+F4) and someone talks to em, cause the socket throws a 10054 error, “Socket connection reset”. Not expected in UDP, i think.
The “talk” method on the client threads is also between try & except tags but still, is the UDP server “recvfrom” the one that triggers the exception.

I am using Python 2.5 (need it for the code) and this socket options:

host = "0.0.0.0"
port = 10000

UDPSock = socket(AF_INET,SOCK_DGRAM)
UDPSock.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
UDPSock.setsockopt(SOL_SOCKET, SO_BROADCAST, 1)
UDPSock.bind((host,port))

There are some options that let me do what I wanted or a library that solves this things?.

Or If i am doing it wrong… there is a way to do/emulate the same behavior as threaded TCP socket (create a new client handler thread on accept) but with UDP?

Thanks for reading 😉

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:17:10+00:00Added an answer on May 13, 2026 at 11:17 am

    The ‘socket reset’ happens because the client sent an ICMP port-unreachable in response to the datagram sent to a socket that wasn’t there any more. Perfectly reasonable way to express that in the API, so you’re just going to have to handle it. But if you just ignore the exception, the socket should still be working.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 290k
  • Answers 290k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer All you could do is find out which methods have… May 13, 2026 at 5:47 pm
  • Editorial Team
    Editorial Team added an answer I think it mattered with the VAX C compiler I… May 13, 2026 at 5:47 pm
  • Editorial Team
    Editorial Team added an answer If this is not something you want to leave in… May 13, 2026 at 5:47 pm

Related Questions

I am trying to take the code in an .ASMX web service and change
I can create an NSPredicate easily using an NSPredicateEditor (a subclass of NSRuleEditor). What
What's the best way to handle an expired password in an ASP.NET MVC application?
let me try to explain my problem. I'm currently trying to develop a small
Title might be a bit confusing, so let me explain. I have a website

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.