Esempio n. 1
0
func (fd *udtFD) listen(backlog int) error {

	if C.udt_listen(fd.sock, C.int(backlog)) == C.ERROR {
		return fd.lastErrorOp("listen")
	}
	return nil
}
Esempio n. 2
0
func Listen(socket *Socket, backlog int) (retval int, err error) {

	retval = int(C.udt_listen(socket.sock, C.int(backlog)))

	if retval < 0 {
		return retval, udtErrDesc("Unable to listen")
	}
	return
}