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

  • SEARCH
  • Home
  • 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

Related Questions

Title might be a bit confusing, so let me explain. I have a website
Alright let me explain my situation first: I am part of an organization that
First, let me explain what I am doing. I need to take an order,
Let me explain: this is path to this folder: > www.my_site.com/images And images are
Is it possible to wipe strings in Delphi? Let me explain: I am writing
This question might not seem programming related at first, but let me explain. I'm
How would you begin improving on a really bad system? Let me explain what
How can I document a member inline in .Net? Let me explain. Most tools
Can PL/SQL procedure in Oracle know it's own name? Let me explain: CREATE OR
I know the question title isn't the best. Let me explain. I do a

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.