mirror of
https://github.com/golang/net.git
synced 2026-03-31 18:37:08 +09:00
This CL reduces unnecessary allocations in ancillary helper functions. Also clarifies documentation on ControlMessage, ControlFlags. benchmark old allocs new allocs delta BenchmarkReadWriteNetUDP-2 6 6 0.00% BenchmarkReadWriteIPv4UDP-2 17 15 -11.76% R=dave CC=golang-dev https://golang.org/cl/9232050
28 lines
663 B
Go
28 lines
663 B
Go
// Copyright 2012 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package ipv4
|
|
|
|
import "syscall"
|
|
|
|
func setControlMessage(fd syscall.Handle, opt *rawOpt, cf ControlFlags, on bool) error {
|
|
// TODO(mikio): Implement this
|
|
return syscall.EWINDOWS
|
|
}
|
|
|
|
func newControlMessage(opt *rawOpt) []byte {
|
|
// TODO(mikio): Implement this
|
|
return nil
|
|
}
|
|
|
|
func parseControlMessage(b []byte) (*ControlMessage, error) {
|
|
// TODO(mikio): Implement this
|
|
return nil, syscall.EWINDOWS
|
|
}
|
|
|
|
func marshalControlMessage(cm *ControlMessage) []byte {
|
|
// TODO(mikio): Implement this
|
|
return nil
|
|
}
|