프로그램 사용/VNC
libvncserver 종료 절차
구차니
2022. 11. 1. 10:45
정작 API 문서에는 아무런 설명도 없다.
[링크 : https://libvnc.github.io/doc/html/group__libvncserver__api.html#ga7560cf50d53208ad5dc24b3d82bbb418]
[링크 : https://libvnc.github.io/doc/html/group__libvncserver__api.html#ga69b57fe0447eac66fe216430bcda5859]
예제에 보면 F11, F12 누르면 서버 종료 되는 내용이 있다.
static void dokey(rfbBool down,rfbKeySym key,rfbClientPtr cl) { if(down) { if(key==XK_Escape) rfbCloseClient(cl); else if(key==XK_F12) /* close down server, disconnecting clients */ rfbShutdownServer(cl->screen,TRUE); else if(key==XK_F11) /* close down server, but wait for all clients to disconnect */ rfbShutdownServer(cl->screen,FALSE); |
rfbShutdownServer(rfbScreen, TRUE); #endif /* BACKGROUND_LOOP */ free(rfbScreen->frameBuffer); rfbScreenCleanup(rfbScreen); |
[링크 : https://github.com/LibVNC/libvncserver/blob/master/examples/example.c]
rfbScreenCleanup은 걍.. vnc 버전 free() 라고 보면 될 듯.
/* hang up on all clients and free all reserved memory */ void rfbScreenCleanup(rfbScreenInfoPtr screen) |
[링크 : https://libvnc.github.io/doc/html/main_8c_source.html]