sockopt_plan9.go 406 B

12345678910111213141516171819
  1. // Copyright 2014 The Go Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style
  3. // license that can be found in the LICENSE file.
  4. package net
  5. import "syscall"
  6. func setKeepAlive(fd *netFD, keepalive bool) error {
  7. if keepalive {
  8. _, e := fd.ctl.WriteAt([]byte("keepalive"), 0)
  9. return e
  10. }
  11. return nil
  12. }
  13. func setLinger(fd *netFD, sec int) error {
  14. return syscall.EPLAN9
  15. }