# PetscSocketEstablish
starts a listener on a socket 
## Synopsis
```
PETSC_INTERN PetscErrorCode PetscSocketEstablish(int portnum, int *ss)
```

## Input Parameters

- ***portnumber -*** the port to wait at



## Output Parameters

- ***ss -*** the socket to be used with `PetscSocketListen()`





## See Also
 `PetscSocketListen()`, `PetscOpenSocket()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/viewer/impls/socket/send.c.html#PetscSocketEstablish">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)  
