sockopt_plan9.go 320 B

1234567891011121314
  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. func setKeepAlive(fd *netFD, keepalive bool) error {
  6. if keepalive {
  7. _, e := fd.ctl.WriteAt([]byte("keepalive"), 0)
  8. return e
  9. }
  10. return nil
  11. }