chadthecoder / graphicsProject

Graphics project using SDL2, ASIO OPENGL, GLEW, WebGL, miniaudio, stb (Only stb_image.h right now), assimp (implementing now), PerlinNoise from Reputeless, and GLM. Following multiple tutorials to learn how to code graphics in C++.
0 stars 3 forks source link

Asio bind keeps port from being used again #9

Closed chadthecoder closed 11 months ago

chadthecoder commented 11 months ago

Can not open server again after closing because port is still being used from the last call. Can manually stop process with sudo "kill -9 (pid)" on Linux. Need to figure out how to close in program to save memory and close process on server close.

chadthecoder commented 11 months ago

Use netstat -o to check processes?

chadthecoder commented 11 months ago

https://stackoverflow.com/questions/34596638/boost-asio-so-reuseport

Maybe answer?

chadthecoder commented 11 months ago

Use on server when server closes and wont open (Not sure why, process is still running on port).

sudo netstat -tulpn, on linux, shows pid of process that is running server) sudo kill -9 (pid), kills process of given pid