Re: [go-nuts] no way to pause `Listen` on net connections

2023-07-23 Thread Bakul Shah
You can do a non-blocking select on a channel prior to l.Accept(). If there is a pause message, you do a blocking select on the same channel for an resume or finish message. A separate goroutine can send you those messages depending on conditions under which you want to pause or resume. If the

Re: [go-nuts] no way to pause `Listen` on net connections

2023-07-23 Thread Kurtis Rader
I think we are going to need more context. If you were able to pause net.Listen().Accept() the kernel's listen queue would eventually fill and the kernel would reject any new connection requests. And when you resumed accepting connections if enough time had elapsed those old connection requests wou

[go-nuts] no way to pause `Listen` on net connections

2023-07-23 Thread David N
I've posted this question on stackoverflow , discussed it with some members of the golang community, and I was encouraged to post here. Problem: I have a secure application and I want

Re: [go-nuts] memory safe languages question

2023-07-23 Thread Kurtis Rader
Wouldn't a forum dedicated to Ada be more appropriate for your question? I'm old enough to remember reading articles about Ada when it was being designed. But that doesn't mean I'm qualified to opine on it as a language and there are unlikely to be many people on this mailing list who are qualified

Re: [go-nuts] memory safe languages question

2023-07-23 Thread Bakul Shah
The NSA paper says Some examples of memory safe languages are C#, Go, Java, Ruby™, and Swift® Note "Some"; it is not an exhaustive list of memory safe languages. Presumably these languages are mentioned b

[go-nuts] memory safe languages question

2023-07-23 Thread Robert Solomon
I've been reading that the NSA wrote a position paper last year about memory safe languages, which include C#, Go, Java, Ruby, Rust and Swift. It's clear to me why C and C++ are not on that list. I always thought that Ada sought to be memory safe, or is equivalent to that by saying that Ada foc

Re: [go-nuts] simplistic web based chat solution

2023-07-23 Thread Eli Lindsey
> - spinning up a new chatting client goroutine (mainly the quoted code > in OP) when a new user logs in, then there will be a new net.Conn for > the client > - since I'm only doing server side programming and one server needs to > serve different clients, the only way I can think of is to store

Fwd: [go-nuts] simplistic web based chat solution

2023-07-23 Thread Tong Sun
Sending to the group instead. On Sun, Jul 23, 2023 at 12:46 AM Eli Lindsey wrote: > > I’m taking a stab at answering, but I didn’t quite follow your intent and may > have misunderstood your question. Please let me know if that’s the case. :) > > I'm having a hard time putting it into my code. Sp