program main use, intrinsic :: iso_c_binding use iso_fortran_env use :: sqlite3 use db implicit none character, dimension(:), allocatable :: form_data character(len=128):: db_path integer :: err, i, length logical :: exist inquire (file="debug.log", exist=exist) if (exist) then open (12, file="debug.log", status="old", position="append", action="write") else open (12, file="debug.log", status="new", action="write") end if ! do while not logged out ! read message from stdin ! if ping then get all logged in users and return their positions to client ! if move update new pos to database ! if logout update logged_in to database ! end do ! send logout all to clients contains end program main