9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Strange behavior of 'go's' DialUDP under Plan9
@ 2018-03-01 15:23 Pavel Klinkovský
  0 siblings, 0 replies; only message in thread
From: Pavel Klinkovský @ 2018-03-01 15:23 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 738 bytes --]

Hi all,

I am trying a very simple 'go' program under Plan9 (both 386 and ARM):

package main

import (
"fmt"
"net"
"time"
)

func main() {
laddr, err := net.ResolveUDPAddr("udp", ":6000")
if err != nil {
fmt.Println("laddr: ", err)
}

raddr, err := net.ResolveUDPAddr("udp", "cpx61.tk8.lan:6000")
if err != nil {
fmt.Println("raddr: ", err)
}

conn, err := net.DialUDP("udp", laddr, raddr)
if err != nil {
fmt.Println("Error: ", err)
}
defer conn.Close()

time.Sleep(time.Minute)
}

When running I check 'netstat' listing:

udp  0    pavel      Open         39505      6000       cpx61.tk8.lan

It seems 'go' port for Plan9 incorrectly handles local port specification
in DialUDP function.

Pavel

[-- Attachment #2: Type: text/html, Size: 1982 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-03-01 15:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 15:23 [9fans] Strange behavior of 'go's' DialUDP under Plan9 Pavel Klinkovský

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).