---
name: "Net.accept"
section: "3kaya"
platform: "linux"
package: "kaya"
version: "0.4.4-6.2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/Net.accept"
---

# Net.accept(3kaya)

Accept a connection on a socket.

## NAME

Net::accept - Accept a connection on a socket.

## SYNOPSIS

**NetHandle accept(** *Int socket* **)**

## ARGUMENTS

**socket** A socket number returned from **Net.listen (3kaya)**

## DESCRIPTION

Accept a connection on a socket. Returns a connection handle. If no connections are currently waiting then an Exception will be thrown - you can call **Net.connWaiting (3kaya)** first to determine if connections are available, although this may not be completely reliable in threaded applications.

## AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

## LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

## RELATED

**Net.NetHandle (3kaya)**

**Net.closeConnection (3kaya)**

**Net.closeSocket (3kaya)**

**Net.connWaiting (3kaya)**

**Net.listen (3kaya)**

**Net.recv (3kaya)**

**Net.shutdown (3kaya)**

**Net.send (3kaya)**
