view libgo/go/net/sockopt_plan9.go @ 157:dafe684d005c

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:08:54 +0900
parents 04ced10e8804
children
line wrap: on
line source

// Copyright 2014 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 net

import "syscall"

func setKeepAlive(fd *netFD, keepalive bool) error {
	if keepalive {
		_, e := fd.ctl.WriteAt([]byte("keepalive"), 0)
		return e
	}
	return nil
}

func setLinger(fd *netFD, sec int) error {
	return syscall.EPLAN9
}