Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UDP Write() will not send 0 byte datagram #274

Closed
gopherbot opened this issue Nov 19, 2009 · 3 comments
Closed

UDP Write() will not send 0 byte datagram #274

gopherbot opened this issue Nov 19, 2009 · 3 comments

Comments

@gopherbot
Copy link
Contributor

by jonathan.r.hudson:

What steps will reproduce the problem?
1. Create a UDP socket
2. send a 0 byte datagram

var b [1]byte;
conn,err := net.DialUDP("udp", nil, raddr);
...
conn.Write(b[0:0]);
/*  conn.WriteToUDP(b[0:0],raddr); // This works */

What is the expected output? What do you see instead?

It is expected that a 0 byte datagram is sent.
The 0 byte datagram is not sent. note: WriteToUDP works posixally correctly 
(in this case a 0 byte datagram is sent).

What is your $GOOS?  $GOARCH?

linux, amd64

Which revision are you sync'ed to?  (hg log -l 1)

changeset:   4150:cb559bd8a773
tag:         tip
user:        Robert Griesemer <gri@golang.org>
date:        Thu Nov 19 00:04:30 2009 -0800
summary:     bug219: parsing difficulties with 6g


Please provide any additional information below.
@rsc
Copy link
Contributor

rsc commented Dec 2, 2009

Comment 1:

http://golang.org/cl/163072

Owner changed to r...@golang.org.

Status changed to Started.

@rsc
Copy link
Contributor

rsc commented Dec 2, 2009

Comment 2:

Labels changed: added packagebug.

@rsc
Copy link
Contributor

rsc commented Dec 2, 2009

Comment 3:

This issue was closed by revision e89441b.

Status changed to Fixed.

Merged into issue #-.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants