mg_socketpair.md 262 Bytes
Newer Older
1 2 3 4 5 6 7 8
---
title: "mg_socketpair()"
decl_name: "mg_socketpair"
symbol_kind: "func"
signature: |
  int mg_socketpair(sock_t[2], int sock_type);
---

9
Creates a socket pair.
10
`sock_type` can be either `SOCK_STREAM` or `SOCK_DGRAM`.
11
Returns 0 on failure and 1 on success. 
12