# PetscSocketListen
Listens at a socket created with `PetscSocketEstablish()` 
## Synopsis
```
PETSC_INTERN PetscErrorCode PetscSocketListen(int listenport, int *t)
```

## Input Parameter

- ***listenport -*** obtained with `PetscSocketEstablish()`



## Output Parameter

- ***t -*** pass this to read() to read what is passed to this connection





## See Also
 `PetscSocketEstablish()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/socket/send.c.html#PetscSocketListen">src/sys/classes/viewer/impls/socket/send.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/viewer/impls/socket/send.c)


[Index of all Viewer routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
