From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mario Lang Newsgroups: gmane.emacs.devel Subject: Re: UDP: Send and receive on same port? Date: Tue, 30 Mar 2021 13:11:47 +0200 Message-ID: <87a6qkew0c.fsf@blind.guru> References: <87mtulxbko.fsf@blind.guru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38770"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Mar 30 13:13:24 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lRCJG-0009wj-UC for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Mar 2021 13:13:22 +0200 Original-Received: from localhost ([::1]:35920 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lRCJF-0003Ns-US for ged-emacs-devel@m.gmane-mx.org; Tue, 30 Mar 2021 07:13:21 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37126) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRCHx-0002E7-Mr for emacs-devel@gnu.org; Tue, 30 Mar 2021 07:12:07 -0400 Original-Received: from familiekainz.at ([37.187.20.171]:45792 helo=ns3035380.ip-37-187-20.eu) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lRCHt-0002Qp-UF for emacs-devel@gnu.org; Tue, 30 Mar 2021 07:12:01 -0400 Original-Received: by ns3035380.ip-37-187-20.eu (Postfix, from userid 110) id 4273B20E; Tue, 30 Mar 2021 11:11:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=blind.guru; s=mail; t=1617102711; bh=JfwsHRQN65KNi4zriwkjuKvgbJS1TtcU/PumLTbB48M=; h=From:To:Subject:References:Date:In-Reply-To:From; b=j9iXcqBZs1bjk+K0sCNsKuBEQVyByrOA/PGXbdSKOlE6TOfrydHvP0cW4jHiVEA9B dX9JxhBKtWKNibWrPrgdUyq/ZYZ8Hx/TWxsNTa8HX6SNOjAM4xWOLd6iDVmhxHqYDg KMXnE1Df/9VP6ezxtCc0/jtK2o/g9jFwSFvfixfk= Original-Received: from x1.blind.guru (84-115-55-45.cable.dynamic.surfer.at [84.115.55.45]) by ns3035380.ip-37-187-20.eu (Postfix) with ESMTPSA id 234A31AF for ; Tue, 30 Mar 2021 11:11:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=blind.guru; s=mail; t=1617102708; bh=JfwsHRQN65KNi4zriwkjuKvgbJS1TtcU/PumLTbB48M=; h=From:To:Subject:References:Date:In-Reply-To:From; b=E54Z/q554fwKIh0WPmMoOlbcG7PlH25g09zDe3cq/Tq2qi+XYN5fGiMUQCiQ5JUsW L7bM/4flKEdHGxXg69XdGKLIK6JW39NUppVW+KE4PhGegAYs2NpEl/TNE7f18+qc6C Q1++jMVmRX4kV0PoMRlUzrv6aDRygfxL4JcED1U4= Original-Received: by x1.blind.guru (Postfix, from userid 1000) id 2F6FBE802E1; Tue, 30 Mar 2021 13:11:47 +0200 (CEST) In-Reply-To: <87mtulxbko.fsf@blind.guru> (Mario Lang's message of "Tue, 30 Mar 2021 10:58:15 +0200") Received-SPF: pass client-ip=37.187.20.171; envelope-from=mlang@blind.guru; helo=ns3035380.ip-37-187-20.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267162 Archived-At: Replying to self Nevermind, it works by creating a datagram server first, and then using set-process-datagram-address to set the destination. The server process can now be used to send UDP as well. However, I am seeing lost incoming packets. According to tcpdump, the reply is clearly there, but the process filter only seems to pick it up 1 out of roughly 4 times. Weird. Mario Lang writes: > Hi. > > Certain OSC (Open Sound Control) applications reply to the UPD sender > port, making it necessary to listen on the same port which was allocated > for the sending process. I remember having asked this roughly a year > ago, and the answer was a no. I'd like to re-raise this one: Can we do > something with the process framework to allow listening on a UDP client > port? I dont see a way to get the allocated port of the sending > process. --=20 CYa, =E2=A1=8D=E2=A0=81=E2=A0=97=E2=A0=8A=E2=A0=95