ECN bits are represented in the TOS field. I think you can use setsockopt
with the IP_TOS option to set the TOS field on a socket. See ip(7). On the
Go side, use the SyscallConn method on your UDPConn, then call setsockopt
using the Control method. Something like this (untested):
Go requires Linux 2.6.23 or later.
On Wed, Aug 5, 2020 at 7:47 AM Ravi Kant Soni wrote:
> It's, where trying to run Binary
>
> -Linux version 2.6.18
>
> -Red Hat Enterprise Linux Server release 5.11
>
> Jenkins, where Binary generated
>
> -RHEL 7.8
>
> -Linux 3.10.0
>
> --
> You received this
I feel like https://go2goplay.golang.org/p/RLn9BXjU1OR is a better
compromise than having two functions.
On Tue, Aug 4, 2020 at 5:50 PM 'Axel Wagner' via golang-nuts <
golang-nuts@googlegroups.com> wrote:
> No, that's not possible. A generic function can only work with *either*
> built in
The entire notion of the constraints package feels a little suspicious to
me. What if the comparable and ordered constraints were pre-declared in the
universe block, and the numeric constraint were named math.Numeric? What
other universal (or close to universal) constraints would belong in this
2.6.23, for most architectures, as far as I know.
On Sat, Jul 25, 2020 at 8:31 AM xie cui wrote:
> what is the minimum version of linux kernel that can run golang?
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from
, Jul 8, 2020 at 1:43 PM Brian Candler wrote:
> On Wednesday, 8 July 2020 11:17:56 UTC+1, Andrei Tudor Călin wrote:
>>
>> I think this works for some cases, but it is potentially wasteful (and
>> even leaky) in terms of resource usage.
>>
>> For example, if ctx
I think this works for some cases, but it is potentially wasteful (and even
leaky) in terms of resource usage.
For example, if ctx is context.Background(), it leaks a goroutine for every
connection. It also keeps the additional goroutine around for the entire
lifetime of the connection. I'd like
Check out Bryan's talk[0], in particular from ~27:00 onward, where worker
pools are discussed. I highly recommend the entire talk.
[0] https://www.youtube.com/watch?v=5zXAHh5tJqQ
On Fri, Jul 3, 2020 at 5:03 PM Atakan Çolak
wrote:
> Hiya everyone,
>
> I have a simple processor function that
Goroutines can only be stopped if they cooperate. They have no user-facing
identity or a handle by which they can be stopped. To cooperate, they need
to be checking some kind of cancellation flag or channel, periodically.
These days, for HTTP servers, that channel is the request context, since
That would work, yes. net/http, for example, has var aLongTimeAgo =
time.Unix(1, 0), which is used for cancellation.
On Mon, May 11, 2020 at 4:47 AM wrote:
>
>
> On Wednesday, June 5, 2019 at 10:14:22 AM UTC-4, Ian Lance Taylor wrote:
>>
>> On Wed, Jun 5, 2019 at 12:10 AM Kurtis Rader
>>
019 at 10:07:57 PM UTC+8, Andrei Tudor Călin wrote:
>>
>> Here is a rough sketch:
>>
>> type allowedIPsListener struct {
>> allowed []net.IP
>> inner net.Listener
>> }
>>
>> func (ln *allowedIPsListener) Accept() (
issue as I do with tls?
>
> On Friday, March 15, 2019 at 9:46:00 PM UTC+8, Andrei Tudor Călin wrote:
>>
>> Begin by implementing a `net.Listener` which checks the list of allowed
>> IPs.
>> You'll be able to run code before the connection is passed on to
>> crypt
tls connection when a client sends SYN?
>
> Thanks in advance.
>
--
Andrei Tudor Călin
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to golang-nuts+u
but if I use just
>
> close(c)
>
> all bets are off, just like in a current Go code? I think this would be
> perfectly code-compatible with an "old" code, keeping Go1 compatibility
> guarantee untouched.
>
> Thank you very much,
>Andrey
>
--
Perhaps https://github.com/minio/c2goasm might be of interest.
I don't see anything in there about Fortran specifically, but I don't think
it would be a huge leap.
On Fri, Mar 1, 2019 at 5:13 PM Jason E. Aten wrote:
> If I include a chunk of assembly .s code in my Go code, does my program
>
The godoc at https://godoc.org/golang.org/x/tools/cmd/guru links to
http://golang.org/s/using-guru which redirects to a document describing
what guru can do.
On Sunday, November 4, 2018 at 6:18:42 AM UTC+1, Jeff Hodges wrote:
>
> Hey, I just googled "guru golang" and "go guru" and wasn't able to
It isn't really possible to do so because there is no nice and type safe
way of getting from a string in the JSON to a Go type,
and a value of said type. You must write a little bit of extra code.
This article: http://eagain.net/articles/go-dynamic-json/ presents a good
approach.
On Wednesday,
Hello.
If any concrete value has been stored in an interface value - including a
nil pointer of some type - the interface will not be nil.
See this section in the FAQ for more
details: https://golang.org/doc/faq#nil_error
On Sunday, February 26, 2017 at 6:06:16 PM UTC+1, 장재휴 wrote:
>
> Hi.
>
In general, a good way to answer questions like this is to inspect an
assembly listing for the code. This is what I compiled:
$ cat foo.go
package foo
import (
"fmt"
)
type Person struct {
Name string
Likes []string
}
func foo() {
var people []*Person
likes := make(map[string][]*Person)
for
19 matches
Mail list logo